One of the most overlooked skills in the workplace is figuring out when to leave. Of course, there are the obvious situations, like when a boss is losing his mind, or a company is about to go under. But most situations aren’t so black and white.

The best way to figure out what to do next is to envision what you’re trying to accomplish. Then you can see what the process of separation might look like and what you might end up with when you move to another job.

Here some tips on how to do just that:

1. Don’t quit to make yourself happy.
A job can’t make you happy. Happiness doesn’t come from making more money or creating the perfect design or being right about the marketplace. Happiness comes from the relationships you make with other people. So work doesn’t make you happy, but it can make you unhappy.

If your boss is setting goals you could never meet, or not setting goals at all, it could be so frustrating that you’ll be unhappy. Or if your commute is more than 45 minutes, you probably have so little control over it that the uncertainty is adding enough stress to your life to make you unhappy. These are reasons to change jobs.

But if you have a job where you have challenging goals that you’re able to meet, ask yourself if you should be changing your personal life and not your job. Because the connection between work and happiness is overstated.

2. Quit as a personal growth opportunity.
The days of stable jobs and corporate loyalty are over. Today, people change jobs constantly. So the best way to create stability in your career is to depend on your ability to get a new job when you need to. The people with the best skill sets have the most flexibility when it comes to changing jobs.

Which means that you need to be building your skill set constantly. If you’re in a job that has a flat learning curve, try to get a project that will challenge you. Or try to get your boss to pay for training. But if you can’t do that, it’s time to quit.

Personal growth isn’t just the key to getting a six-figure career. It’s also the key to keeping yourself engaged in your work and employable in the marketplace.

3. Use quitting as a networking opportunity.

The minute you quit, your relationship with your boss changes. Now you’re equals. Now you’re two people who work in the same industry and are part of each others’ network. When you tell your boss you just got a better job, you immediately become more appealing to him or her — as a networking opportunity. Manage this moment carefully, and you and your boss will be able to help each other for many years to come.

As I’ve written here before, forget things like exit interviews — those never help anyone. After all, if the company were really interested in what you have to say, they would’ve asked you while you were an employee. So stick to the positive stuff. Be gracious and grateful — even if you’re not feeling a lot of gratitude, you can find something positive to focus on.

Quitting is a great moment in your career to build new bridges for yourself, but you need to have a solid plan for how to manage the situation well.

4. Don’t feel guilty.

Even though today’s 20-something workers change jobs every 18 months, they typically feel guilty about giving notice. This strikes me as a new phenomenon. As a Gen-Xer who graduated into one of the worst job markets in history, I gave notice with glee, because the jobs I had in my 20s were mostly lousy.

Today, though, young people have unprecedented opportunity in the workplace, and often their bosses make a big effort to retain them. So it makes sense that quitting will be difficult. But people who quit don’t need to feel guilty.

If you’re quitting because of a new growth opportunity and your boss cares about you, he or she will congratulate you and ask you to keep in touch. And when it makes good sense for you to take a new job and you’ve been a good employee, quitting is likely to go smoothly.