I've learned to mentally count to 10 and think before speaking, when what I really want to do is ream someone a new a--hole, (sorry, just thinking about being angry has hit a nerve). Sometimes an outburst can really burn some bridges -- one can apologize but the words can't be taken back and, unless one wins the lottery or was born wealthy, there's no way to totally avoid social interaction and still work, buy necesseties, etc.
I've worked for the same government agency for nearly 16 years and am one of only a handful who've been around that long and seen others come and go, so I'm fortunate that there's a core group, albeit a small one, that knows me and my peculiar habits very well. When I wake up angry at the world for absolutely no reason yet still need to go to work, my way of coping is to apologize in advance and just SAY I'm angry for no reason and ask my coworkers to please forgive me if I should say or do anything that seems snarky or mean, that it's MY issue and has nothing whatsoever to do with them.
_________________
When two elephants fight, the grass and trees suffer. -- King Sunny Ade