Jenny Slate has a secret, successful formula about exactly what to do if you're fired. Write it down and save it for a rainy (career-wise) day:
When I was fired, I ordered 50 million pizzas and invited all of my friends over. It's important to let yourself go through all the emotions. But quiet contemplation isn't all it takes to get you through a screwup. Join a meditation group; go on vacation. Do something. (Just don't become an alcoholic.) ... Remember, one day we'll all be 81 years old and not give a sh-t about the mistakes we made.
The best way out of emotions is through them — but over pizza with the friends. There are more wonderful steps outlined in her how-to in Glamour, which is worth reading in its entirety. With this and suggestions about what to wear after a breakup, Jenny Slate is in the top-tier position for people that actually give useful, concrete, good, actionable advice about what to do when life sucks.