Getty Images

Whether it’s an unceremonious firing, a layoff, or the sinking realization that your dream job is anything but, career disasters can actually be a positive wake-up call that sets you off in a better direction.

Of course, in the moment, it can be difficult to see any silver lining.

How in the world are you supposed to turn one of the worst moments in your professional life into one of the best things that’s ever happened to you when you can’t even get out from under the covers?

The secret to successfully transforming a major workplace setback into a minor career stumble?

You need to have the right attitude—and strategy—to move forward, says Patricia Crisafulli, coauthor of “Comebacks: Powerful Lessons From Leaders Who Endured Setbacks and Recaptured Success on Their Terms.”

And what better way to learn more about the “rights” in these tricky situations than to go straight to the source for advice: been-there, done-that setback survivors.

Read on for their stories—and hard-earned career reset wisdom.

“I got fired from my dream job—and could barely face myself, let alone others.”

Just 20 minutes after getting sacked from his position as an editor at a national magazine, Leo Charles*, 46, called his wife to tell her the bad news.

Then he just sat in his car—in shock.

“I felt crushed. I didn’t want to go home. I didn’t want to go back into the building. I didn’t want to tell my parents,” he recalls. “I felt completely ashamed—like I didn’t measure up.”

The Career Silver Lining: Whether you lose your job like Charles, or lose face after making a major mistake at work, embarrassment can be a paralyzing aftereffect.

“The shame really is the toughest part,” Crisafulli says.

To break out of that shame spiral, talk to friends or colleagues who’ve been through it. Then draft up a list of people who’ve had similar major setbacks—and have gone on to do great things.

Bottom line? Do whatever it takes to keep your situation in perspective and avoid that paralysis, stresses Crisafulli.

Then take a hard look at what went wrong with your own situation—and actively learn from it. “Maybe you now know that you don’t do well in that type of work environment, or you should look for a different kind of work altogether,” Crisafulli says.

In Charles’ case, the firing helped give him a clearer perspective on his strengths and weaknesses. Specifically, he realized that his boss was expecting things from him that he wasn’t verbalizing, so Charles no longer waits to be asked to do something—he takes ownership of a situation to get the job done.

“My boss hated everything I did—and there was no way to fix it.”

When Alexandra Johnson*, 50, landed a big job as a communications manager, she secured herself a nice paycheck—and a not-so-nice boss.

“I’d always been a star at work, but suddenly, I couldn’t do anything right,” Johnson says. “All of my reports got kicked back to me with harsh-but-vague comments, and I’d hear my boss badmouthing me to other staff. I got so paranoid and anxious that I really did start messing up.”

The Career Silver Lining: When things are blowing up at work, it can be tempting to just keep your head down and try to forge on.

Big mistake.

You’ll just keep burrowing yourself deeper into a hole, says Crisafulli, adding that you should get support instead—and fast.

And when we say support, we’re not talking about friends and family. It needs to be a professional peer who can truly understand what you’re going through, and most important, doesn’t have a stake in your ability to earn a living.

In other words, someone who can be unbiased.

“What was most meaningful for me was talking to a former employer who knew my shortcomings and strengths,” Johnson says. “She gave me advice on how to deliver more of what my boss wanted. And when that didn’t work, she suggested that I consider quitting—or risk having my confidence completely destroyed.”

And that’s exactly what Johnson did—after just 10 months on the job.

“I learned an important lesson, which is that no matter how hard a worker I am, I can’t turn every situation around,” she says. “And if I’m not respected at work, I should move on. Quitting was the best thing I ever did because I was able to leverage the salary from my ‘failed’ job at my next one—and I’ve only built from there.”

“My boss fired me because I wasn’t a team player.”

When Roz Usheroff was working at Ralph Lauren, she was pretty confident in the notion that she was doing a good job at work.

That is, until she got the boot.

“When my boss called me in and fired me, he said, ‘You don’t want to be a lone ranger—you have to build meaningful relationships at work—with me and others,’” recalls Usheroff, now over 50.

The Career Silver Lining: “The most important thing I learned from the experience is to ask what you could have done differently,” Usheroff says. “If you’ve been fired, don’t be confrontational. Instead, say, ‘I don’t want to repeat this in my next job.’ And hopefully they will give you feedback.”

Another lesson learned, says Usheroff, is to think of your manager as your number-one customer—and treat them very well.

It may seem like a no-brainer, but both Usheroff and Crisafulli say it’s a mistake employees tend to make. “People can be nicer to rude customers than they are to their own bosses,” Crisafulli says.

“And if you hate to ‘play office politics,’ think of it as managing your brand instead,” adds Usheroff. “If you don’t clearly present how you want to be viewed, someone else will define you—and you may not like what they have to say.”

3 Bonus Tips for Bouncing Back From a Job Bomb:

Whether you’ve lost your job—or you’re still hanging on by a thread—these universal moves can help you recover and reset.

1. Feel the pain. We’d all love to avoid the sadness that comes with a major career mishap, says Crisafulli, but it’s crucial to let yourself mourn.

“One C.E.O. we quoted in my book said, when someone has a setback, everybody says, ‘It’s not that bad,’” Crisafulli says. “It’s well-intentioned advice, but if you avoid feeling that pain, you’ll never get over it. You can never move on.”

2. Force yourself to make new connections. One of the best ways to recover from a career setback is to get right back in the game.

While it’s true networking is probably the very last thing you want to do, the sooner you can forge new contacts and build your network, the sooner you can nab that next great gig.

And don’t wallow in your self-pity and just rely on LinkedIn, Usheroff says; making meaningful, face-to-face connections can be invaluable when networking.

3. Own your mistakes. Within a company or within an industry, word can spread about career mistakes. And no one wants to hear a bunch of excuses, Crisafulli says.

“If recruiters ask you about being at a job for only a short time,” she says, “tell them you figured out it was not where your strengths lie—that you now know you’ll do better in an environment like theirs, where you’ve learned that you’ll thrive.”

More From LearnVest: