A number of years ago I was working at a company fighting for survival. There were two camps, and, to put it kindly, I had set up my tent in the wrong one.

That left me rather unexpectedly without a job. I had known the end was coming, but the suddenness caught me off guard. That led to a rare moment of self-doubt where I questioned pretty much every choice that got me where I was.

It wasn't a good feeling, at least at first. But after talking with a few trusted advisors, I began to feel better. Yes, things had not gone as planned, but that did not reduce my value. I was unemployed, and that's always scary, but freelance work started coming in before I had even gotten home.

My slate was open, and that meant opportunity was ahead of me. Losing that job set off a chain reaction of jobs, which included a stop at a major technology company, a dream job at my hometown newspaper, starting my own company, and landing in my current better-than-a-dream life as a Motley Fool contract writer.

Losing your job stinks, but it can also be an opportunity. Pull yourself together, dust yourself off, and use your misfortune to create your dreams.

Question marks surroung a man.

Losing your job can be a blessing in disguise. Image source: Getty Images.

1. Make the change you dreamed about

Sometimes a steady paycheck keeps us from pursuing our dreams. It's hard to trade stability for a chance at greater happiness, but losing your job can force you to make that change.

Being unemployed opens you up to take steps toward doing something else. That may mean training, more school, or simply entering another field. Whatever it is, embrace the chance to follow a path that leads someplace better.

2. Be open to anything

For much of my career, the idea of being a small cog in a huge machine held little appeal. That's why I turned down previous offers from my college roommate and closest friend to interview at the large technology company he worked for.

This time my mindset had changed. I craved stability. I wanted a paycheck I knew would clear and hours that bordered on reasonable. I ended up working for a start-up with the giant company. It was a new, unexpected adventure, and was basically the start of the current chapter of my life.

3. Act like a free agent

Unless you got fired for some sort of gross negligence, it's best to act like you're on the market because you choose to be. Carry yourself like an experienced pro who's a catch for any employer.

Be bold and reach out to companies to talk about potential opportunities. Work from a position of confidence, even if your insides are screaming in fear.

It's a beginning

Losing a job hurts, but it's also an opportunity to start over. Mourn for a few days if you need to, but don't wallow. Make getting a new job your new job, and attack the process.

This is a chance to land something better than what you had before. That might mean more money, a higher position, or even just co-workers you like more. In addition, losing a job is a chance to hit reset, to move in a new direction if you didn't love your previous one.

Embrace the opportunity. Turn lemons into lemonade (or maybe a nice lemon meringue), and if you work hard enough, your loss may turn into a big gain (like it did for me).