At some point in your life as a job-seeker, no matter how amazing the skills or experience you bring to the table, there will almost certainly come a time when you’re not the successful candidate. You’ll get an email or phone call with the bad news that the company you’ve been interviewing with is moving ahead with someone else.

Rejection is hard even in the best of circumstances, and handling it well is really difficult. Particularly so if you’ve become emotionally invested in the job you were interviewing for. It’s quite natural as interviews progress to start imagining what the new job will be like, picturing ourselves in the offices, working with the people we’re meeting. We can become very attached to that imagined future. When you learn that you aren’t the successful candidate, it can feel like the rug was just pulled out from under you.

It may feel like your professional capabilities are being called into question, that your experience is less valuable; you might even feel that you’ve come across in your interviews as less personally likeable than the other person (all of this complicated by the fact that you don’t usually know anything about the other candidates). In reality, it’s almost certain that none of these things are true. In any competition for a job where there are multiple candidates, only one can be chosen. That choice is often quite difficult for the people making the decision, and it’s often a very, very close call. You wouldn’t have progressed as far as you did if you weren’t skilled, with good experience, and weren’t likeable.

That having been said, no matter what emotions you might be feeling (or what choice words you might really want to say to the person delivering the news), it’s vitally important for you to respond to this bad news professionally, and with decorum. To avoid shooting the messenger, in other words. Here’s how.

First, take a moment.

Before doing anything else, you’ve got to deal with the emotions you’re feeling. It’s perfectly natural to feel anger, hurt, sadness, even envy of the person or people moving forward. Allow yourself to feel what you feel. Force yourself to wait to respond. This is much easier if you’ve received the bad news by email (in which case you only need to resist the temptation to reply right away). It’s more difficult if you’re getting the bad news by phone. If this happens, it’s best to simply say, “I’m sorry to hear that, but thank you for letting me know,” and follow up with a lengthier response afterwards (more on that below).

Whichever the case, give yourself at least an hour or two, perhaps the rest of the day, to absorb the news before responding directly.

Next, reflect on the situation.

There are two parts to this self-reflection. The first is to focus objectively on the bigger picture, to apply reason to the situation. There may have been a very good reason (or several) why the company decided that you weren’t the best fit for the job. In any job, there are many factors that make for a good fit. Some relate to technical ability, others are about how well someone might work with the rest of their team, or their manager. The factors that make a person a poor fit for a specific job don’t mean they’re a poor candidate overall. It’s like a puzzle: every piece fits perfectly somewhere. Trying to force it to fit somewhere else never ends well, for the piece or the puzzle. If the company thinks another candidate should be hired, it may be because they saw factors that would have made you miserable in the job, if you’d been hired. In other words, you may just have dodged a bullet!

The second part of this reflection is a bit of self-coaching. In retrospect, was there anything you could have done differently? In the last interviews, did you answer the questions as well as you could have? Did you keep doing your research, showing sincere interest and initiative? Did you make it clear you were interested in the job? None of this reflection should be punitive; it’s not about making yourself feel worse for things you could have done differently. This is about refining and honing your interviewing skills, so you can take lessons learned into the way you compete for the next job.

Then, respond professionally.

When you respond to a rejection, whether by email or phone, brief is best. There are really only three things to be said. First, it’s perfectly fine to express your disappointment, to say that you were very interested in the job, and that you’re sorry you aren’t being considered. Second, use a positive tone (again, no matter how you might really feel), perhaps wishing the company the best with the candidate they select. And third (assuming that this is true), let them know that if things change, you’re open to being considered for this position or a different one. You’d be surprised how often unsuccessful candidates for one position go on to become successful candidates for another spot with the same company. This is one reason it doesn’t pay to burn bridges.

Ask for feedback

It’s good practice to ask for any feedback the company might offer. You won’t always receive it, but it never hurts to ask. And when you do hear back, you might hear something that helps you refine your target list of companies, identify a skill-development opportunity, or perhaps even improve something about your interviewing technique.

Finally, move on.

There’s no way around it: if you’ve invested time and emotional energy in the prospect of a new job, imagining it in the ways mentioned above, it’s difficult to move on. At the start, it may feel like you’ll never find another job as good as the one you were interviewing for. It also might feel futile – as if since you weren’t successful with this one, you’ll never be successful landing a new job. Neither is true. You will find prospective jobs that appeal to you just as much, and you will be successful at landing one. You just need to move ahead.

The best way to start letting one thing go is to find something else to latch onto. You’ll find that the more ‘irons in the fire’, the more activity you’ve got underway, the more optimistic and hopeful you’ll feel. So, after sending your response to the company who rejected you, prepare and submit a new application or two. Channel your energy into a future focus, and you will feel better.