Three Olympians stand on their stair-step pedestals, in order of victory. Who’s the most miserable? Second place.

Whether an athlete eyeing the gold medalist , or an executive who narrowly lost out on a corner office job, the runner-up’s mental refrain is the same, notes executive coach Brad Stulberg: “I just almost made it.” And quickly, “you start to wonder, well, am I ever going to make it?”

Call it the curse of the silver medalist. You survive rounds of interviews, collecting positive feedback all the while, only to be told your résumé is missing a key ingredient. Or the promotion went to somebody whose “turn” it was. Or, you’re given no explanation at all.

More people are feeling the sting. Companies that rushed into the hiring frenzy of 2021 and 2022 are now carefully calibrating their staffing levels. Some are culling middle managers , leaving fewer opportunities to ascend. The percentage of people promoted at U.S. employers reached 7.3% in 2022, according to data from payroll-services provider ADP. In 2023, it dropped to 6.5%.

Today’s runner-up for a job probably would have gotten an offer a couple of years ago, says Karen Vladeck, a legal recruiter based in Washington, D.C. If you were good, employers would just make room.

“Firms and companies just don’t have budgets for that right now,” she says.

Coming in second doesn’t have to send you into a spiral. If you regain your confidence and focus, and get back on the boss’s radar, the next opportunity could be even better than the thing you failed to win first.

Get back to work

If you’re ambitious, it’s inevitable that you’ll come in second at some point. The higher we climb, the fewer jobs there are, and the tougher our competition gets. Stulberg, the executive coach and author of a book about navigating change, recommends reminding yourself that falling short “is actually a sign that I’m right where I need to be, competing against the best people.”

If you’re upset, remember that being hurt is often just the price of caring about something, Stulberg adds. He advises giving yourself a set amount of time, say 48 hours, to mope. Then get back to work.

After all, doing the work is the thing we can control, unlike whether we’re handed some shiny prize . Often, you just need more reps to get better, Stulberg says, or more time to get lucky . One of his clients spent two years falling just short of clinching huge business deals, with contract after contract falling apart in negotiations. The executive wondered whether he was the problem, and mulled making rash changes to his approach. Stulberg urged him to stay the course.

Eventually, he clicked with a massive deal that set him up for the next few years, Stulberg says.

When to stay, when to go

Early in her career, when Mita Mallick was passed over for a promotion into management, she decamped to her office bathroom to cry.

Now, as an executive with a financial software company, she can see she needed to take on assignments that would have made colleagues at her consumer products company think, “Wow, she’s not a manager yet?”

“We’re trained from a young age—grades, report cards—there’s always a next next next something,” says the New Jersey resident. Hitting the skids in corporate America felt like, “Where’s my next medal?”

She started a newsletter about beauty trends, sending it to 200 people at her company, and mentored new employees. A year later, she won the promotion.

At another point in her career, Mallick felt stuck in a job she excelled at. A mentor told her the boss was making sure she couldn’t move on to a higher role.

“You’ve made yourself indispensable,” Mallick says she was told. “He’s not going to let you go.”

She eventually left for another company.

Doing your due diligence

Getting this close to the next step can make us even more eager to move up, says Tessa West, a psychology professor at New York University and author of a forthcoming book about working through career unhappiness. It’s hard to know when to stop trying.

If you’re stuck in the “runner-up hump,” as she calls it, you need to gather more information. Just asking why you didn’t get the job might not do the trick.

“Bosses don’t want to tell you there’s something wrong with you,” she says.

Instead, ask for data on the last five people who did pass the test. Examine their trajectories. Maybe you’ve been crushing it in your current role, but you missed a step years ago—an international assignment or working in the field—that’s now considered crucial experience. Figure out how to fill in your gaps, or explain why they’re not an issue during your next shot at a new role.

You can also ask the boss how many times people typically have to run the gantlet to snag the promotion, West adds. In some organizations, it takes raising your hand several times before you’re considered ready.

James Hunt knew returning to a corporate job after a couple of years as a real-estate entrepreneur would take time. He spent six weeks interviewing for a director role with a snacks company. The hiring manager discussed compensation, potential start dates and plans for the transition.

“I felt like I could taste it,” says Hunt. Then he got a call: The company went with an internal candidate.

Hunt says he focused on being gracious, rather than bitter. He kept in touch with the hiring manager, sending him the occasional email.

A month later, the hiring manager called him. He had another opening, a job overseeing the person in the role Hunt had lost. Could he start in two weeks?

“I was like, what?” Hunt says.

The role was more senior, better paying and ended up springboarding his career. Hunt now lives in Florida and works for a consumer-intelligence company.

He says he feels nothing but gratitude for having originally been the runner-up.

Write to Rachel Feintzeig at Rachel.Feintzeig@wsj.com