Your friend is absolutely, positively, 100 percent sure that she’s going to get the job she applied for recently. She’s so certain, the two of you agree to celebrate over dinner. Then she calls and says, dejectedly: “I can’t believe it. I didn’t get the job.”

What do you do?

Knowing how to handle this sensitive situation, especially if your friend has been looking for work for a while, can be challenging.

While there’s no-one-size-fits-all answer, I’ve learned from my experience as a career coach that certain types of consoling responses tend to be more useful than others.

7 Ways to Help When a Friend Doesn’t Get a Job

Here are seven ways to help your friend (or any other special person in your life, including your spouse or adult child) deal with the aftermath of an unexpected job rejection. For simplicity’s sake, throughout this piece I’m describing the friend as a woman, but the advice would be the same for a man:

1. Offer a sympathetic ear. Often the most important thing you can do, at least initially, is be a good listener.

Diane Machado, director of career development and internships at the College of Mount St. Vincent in Riverdale, N.Y., says, “The best thing to do is let them talk about what happened without trying to instantly provide advice.”

While your instinct might be to immediately go into fix-it mode, it’s more important to be a sounding board. This will allow your friend to process the news and her emotions.

2. Acknowledge the loss. Let your friend know that you recognize how disappointed she is. A simple but heartfelt “I’m so sorry” is often the best thing to say.

Steer away from platitudes, like “everything happens for a reason” or “this is a blessing in disguise.” A phrase like that might come across as trivializing your friend’s pain. “It totally negates the feelings the person is having,” Machado says.

Of course, it's fine to agree with your friend if she concludes on her own that “everything happens for reason.” Just don't be the one to put those words in her mouth.

3. Be sensitive to the unspoken issues of your friend’s employment search. Her reaction to not getting the position might be about more than just the job. There are often a host of financial, logistical and family worries connected to finding work.

Your friend might be up at night thinking things like: Will we need to move? How long will it be before I find a job? Can we afford to pay our daughter’s college tuition next year?

Many people missing out on job offers also find themselves dealing with bouts of insecurity. They wonder: Am I to blame for losing my job and not being able to find a new one? Do I look too old? How can I explain my lack of social media skills to an interviewer?

Regardless of whether your friend gives voice to these types of concerns, you’ll want to be sensitive to them. Chances are, you’ll spot subtle hints that they’re on her mind if she doesn’t express these fears openly.

But you’ll likely face a delicate balancing act. On the one hand, you want to keep things as normal as possible and not make your friend feel like you’re treating her any differently than before. On the other hand, she might be worried about money, for example, and not want to spend as much as she normally does.

The best thing you can do is err on the side of caution.

If she’s nervous about her finances, invite her to things as you normally would, but try to steer away from potentially uncomfortable situations (like dining out with the couple that always orders the most expensive bottle of wine on the menu). Instead of asking her to go to a show, suggest a low-cost alternative, like a movie night at your local library.

If your friend balks at the idea, don’t push it.

4. Look for ways to cheer her up. In a job search, a person’s mindset matters as much (or more) than the mechanics of actually applying for a position. That’s why you’ll do your chum a great service by boosting her mood. And nobody can cheer up people as much as a good friend.

So look for simple and fun ways to improve her mood. It doesn’t really matter what you choose, as long as you come up with something she really enjoys. The two of you could go for a hike, watch a ball game on television in her living room or enjoy a funny movie together.

As Shawn Achor, author of The Happiness Advantage, noted in a Next Avenue article, research has proven that happiness is a crucial component for success in all areas of life – including your career. If you put happiness before success, Achor says, “you wind up with greater happiness and greater success.”

5. Give it time. Recognize that people coping with unemployment often experience many of the same emotions others do when dealing with grief, especially if they’re over 50.

The psychiatrist Elisabeth Kübler-Ross described the five stages of grief as denial, anger, bargaining, depression and acceptance. Don’t be surprised if your friend needs to work through each one.

That said, everyone adapts to bad news in his or her own way and timetable. Some people need to talk through their anger; others crave solitude.

Take your friend’s lead: If she wants to talk, talk. If she prefers to be left alone for a few days, give her the space.

By paying close attention to her cues, you’ll know when she’s ready to move past her disappointment and focus on her next steps.

6. Ask, “How can I help?” This sounds so obvious, but you’d be amazed how often people spring into action without asking what type of assistance, if any, is wanted.

Ask your friend then listen carefully to her response. If she says she’d prefer handling things on her own, respect her wishes. There can be any number of reasons why she’d rather go it alone and it’s not your role to argue with them. Remember, you are her friend, not her parent or coach.

But if she responds with some version of “I’m not sure,” then you can propose a few options.

One simple way to be of assistance is to send your friend a link to a good job-search website that she might not know about, like Job-hunt.org. Or you could suggest she subscribe to SmartBrief on Your Career, an excellent e-mail newsletter that provides a daily snapshot of career news from around the Web.

7. Encourage her to ask the employer why she didn’t get the job. As a recent Wall Street Journal article noted, few applicants ever find out the real reason they weren’t hired. It is far easier for employers to ignore the inquiry than risk dealing with a scorned job seeker.

Nonetheless, I think it still pays to ask.

The best way to do it is by sending a brief email that says:

“Thanks for letting me know so quickly about the job. While I am disappointed that the position was offered to another applicant, I wanted you to know how much I enjoyed our conversation and the opportunity to interview. I'm also writing to ask if you might be willing to give me some advice for the future. Are there suggestions you could share about how I could have been a stronger candidate for this position? Any insights you could offer would be most helpful as I move forward with my search.”

I recently suggested that a client send an email like this after she lost out on a job. By doing so, the woman learned that she was the employer’s No. 2 candidate (out of 80 applicants) and that the only reason she wasn’t chosen was because she didn’t have enough grant-writing experience.

Knowing this made her feel better (well, at least a little) and motivated her to sign up for a grant-writing course that will improve her marketability in the future.

You might tell your friend that story. It’ll help her see that she’s not alone and that there are ways to become a stronger job candidate so she’ll be scooped up for a position in the future.