We don’t always get the job or the promotion, and sometimes, a perceived failure is really a blessing or opportunity in disguise.

Moving forward from failures or missed opportunities is about changing your perspective and taking action.

As PepsiCo’s first female CEO Indra Nooyi once said, “There is nothing like a concrete life plan to weigh you down. Because if you always have one eye on some future goal, you stop paying attention to the job at hand, miss opportunities that might arise, and stay fixedly on one path, even when a better, newer course might have opened up.”

Here we’ve outlined the steps that you can take after a failure to help you process the experience, learn from it and keep pushing forward.

Ask yourself WHY

You just found out that you didn’t get that job you were pining after. Even though you practiced by doing mock interviews with your roommate, you were dressed to impress, and you definitely felt that there was rapport between you and the manager who interviewed you. So why did this happen, and why now?

Sometimes, your first instinct will be spot on – you don’t have to really think about it, but you know exactly why things went down that way. It’s possible that you felt something was off during the interview, but you couldn’t put your finger on it. Maybe there were things about this job or the company that you weren’t excited about, but you brushed them aside because you thought this was the right move for your career. Now’s the time to zoom in on that feeling and explore it. Write it out, go for a jog while you ponder it. Or talk it out with a friend, which leads us to the next step…

Discuss what went wrong

It can really help to discuss the situation with someone you respect and trust. That outside perspective of your experience may be just what you need to finally see the big picture. It’s the same reason you go see a therapist – to get an objective point of view from a neutral party. Sure, you can discuss this failed experience with a good friend, but you have to trust that your friend will be honest with you about her take on the situation. A shoulder to cry on is nice, but after that, it’s time to put your game face on and dive into the blatant truths of how you’ve been approaching your career.

Fill in your knowledge gaps

We’re supposed to learn from our mistakes – but you can’t always learn without shifting your perspective. To do that, you need to find the right resources or perhaps a mentor who can help you fill in the gaps of your knowledge in this area. If you’re looking for a promotion at your place of work, ask a more experienced colleague you admire if he/she would be interested in being your mentor. Get in touch with your alumni association, which may be able to connect you with a mentor in your field. There are also business organizations that offer free or paid mentorship programs.

Aside from having a mentor, take a look at honing your skills – or adding brand new skills to your resume.

There are plenty of ways to do this: take free online classes from websites like Coursera or EdX, attend relevant conferences and workshops, join a professional organization that offers classes or seminars to help you build your knowledge. For example, Toastmasters is a group for those wanting to learn how to become a better public speaker.

Once you’ve identified the skill or knowledge that you’ve been missing, that would have avoided your failure, you should realize that if you had not failed in this particular instance, it would have taken you much longer to notice these gaps in your knowledge. (This is where you can say, ‘thank you failure!’)

Write down three things you learned

To make sure you learn from this experience and don’t repeat the mistake, write down the three (or more) things you’ve learned from this experience. Put it on a post-it note that you can stick on your bathroom mirror or at your desk. Seeing this constant reminder of your failure and lessons learned is a good way to memorialize that moment when you became more self-aware – and how you have shifted your approach to your career since then.

Let it go, move on

Now, it’s time to let it go and keep moving forward. You’ve made yourself aware of what went wrong, you discovered the lesson to be learned and you’ve noted it down so that you won’t repeat your mistake. Time to forge ahead toward your next job interview or request for a promotion or whatever your next career challenge may be.

The pursuit of success is a path strewn with failures – just remember to view each failed attempt as a stepping stone to a greater future, and you’ll be just fine.