So, you got passed over for that promotion you really wanted. Here's how to handle it, what you should do next, and how you can get it the next time.

4 things to do when you didn’t get that promotion

After months of interviews and trying to impress bosses and coworkers, you find out you didn’t get that promotion you really wanted after all. Dreams of how to allocate money from your shiny, new raise, a new title and the greater opportunities to prove yourself that you’ve been craving immediately fade away.

Here’s what to do when you’re bummed about being passed up for a higher-level job.

Ask for feedback

This could help you work smarter. You’ll really understand what your company is looking for the next time you throw your hat into the ring.

Alison Green, author of the Ask a Manager blog, says it’s appropriate to ask for feedback from the hiring manager — as long as it’s clear that you genuinely mean it.

“[I]n asking for feedback, be sure that it’s clear that you’re not looking to challenge the decision; if you come across as even a little bit adversarial, you’re much less likely to get candid feedback,” Green writes in U.S. News & World Report. “Instead, explain that you understand that someone else was a stronger candidate this time but that you’d be grateful for any advice on how you can better position yourself as a candidate in the future. You can get incredibly useful insights by doing this – everything from learning that you need to improve how you come across in interviews to learning that you need to shore up your skills in a particular area.”

Stay calm

Just like when you get a bad performance review, resist the temptation to do something unprofessional— like throwing an adult temper tantrum.

Yes, you may already have a lot on your plate, but you risk looking like a work martyr, which could reflect poorly on you.

Consider how you act towards the person who was chosen

Let’s say the person who got the role was a colleague. Can you be as gracious to them as you would have wanted them to be to you if you were in their shoes?

One similar example, which came in to FiveThirtyEight’s advice column, Survey Says, happened when a reader named Matt got promoted over his friend and roommate Will, prompting Will to become “a bit down and standoffish.”

“[T]his is a really tough situation,” FiveThirtyEight’s advice columnists write, adding that it all comes down to how the passed-over coworker will handle the situation.

“I think a coffee between friends works, or honestly — if they both drink — maybe a night out would work to blow off some steam and get it out there. The immediate issue appears to be that Will isn’t addressing things with Matt face to face.”

This isn’t to say that after one discussion, all will be forgotten and the elephant in the room will disappear, but being direct is a good start.

Get back on the job hunt

Really think this one through first— don’t quit simply because you’re angry. When the dust eventually settles, you might be sorry you did.

So before you quit, think about if you have enough money to sustain yourself before getting a new job, and make sure you leave on good terms.

In a response to reader’s question about not snagging a promotion, Alan Henry writes in Lifehacker about how you shouldn’t “burn your bridges before” getting a new job.

“There’s no reason to tell your employer that you’re looking for something else just because you didn’t get the promotion, and don’t just lash out and tell potential employers that you want to quit because of the promotion issue. It won’t do you any favors on either end,” Henry says, adding that if you’re going in with a clear head, you can use the promotion disappointment to motivate you to find somewhere new.