Even if you have a great job at a fabulous company working with wonderful people, things may not always go your way. Perhaps you got passed over for a promotion, or maybe you weren't recognized properly for work you did.

These things happen to everyone, and they can be frustrating. The challenge is handling your disappointment in a way that keeps it from impacting your future.

That doesn't mean you have to ignore what caused your frustration. It just means that you have to handle it in a positive way.

A person hides under a laptop while holding a sign that says help.

You may feel this way, but you can't act this way at work. Image source: Getty Images.

1. Stay professional

If you get passed over for a promotion, it's reasonable to sit down with your boss and ask what you can work on so you get the nod next time. It's generally best to focus the conversation that way rather to phrase the question as "Why did she get the job over me?"

The other person does not matter, and the reasons you lost out may be valid, unfair, or neutral (you were both liked but the other person had seniority, for example), but they don't matter either. What's important is showing a willingness to grow and making it clear that while you're disappointed, you're ready to get back to doing a great job while working on improving weaknesses.

2. Talk to someone

Everyone needs a person to vent to outside of the office. That might be a friend, a significant other, or a parent. Find that person and say everything you want to say. If you're angry, be angry. Get it out so you can let it go.

This step won't solve anything, and it won't address the cause of your frustration. It will, however, give you a chance at moving on by having someone sympathetic listen, even if all they can do is be supportive.

3. Have a mentor

It's great to talk with a friend, but it's also a smart idea to have a mentor who can actually guide you through solving your problem. Your mentor may be a more senior person in your own company or someone with related experience who can help guide you.

Your mentor can offer perspective and let you know when you're letting emotion overpower common sense. This should be someone you trust who has stood where you are standing and can maybe help you avoid some of the mistakes he or she made in the past.

Don't let frustration define you

It might be hard to deal with, but you're not going to get everything you want all the time. Sometimes things won't turn out as you wish even when you have checked all the right boxes and done what needed to be done.

Pity yourself for that -- for a moment -- then move on. Turn frustrations into fuel and be ready to seize the next opportunity. How you handle adversity shows your boss (or your next boss) what you're made of and how you will act when things don't go your way.

Showing that you can accept defeat, bad news, or simply not getting what you want sends a very clear message about the type of person you are. You can't change whatever has gone wrong, but you can prove yourself worthy of whatever might come next.

Don't let frustration define you. Don't even let it show. Take the steps above to correct your course, and eventually whatever is bothering you now will seem like a small blip.