When an employee quits, no two-week notice, just I-have-to-leave-today, you need to know exactly what the situation calls for. We all know it happens sometimes, but if it's someone you're close to and rely heavily on, you can feel betrayed. 

"You may feel deserted and alone," Anat Lechner, a clinical associate professor of management and organizations at New York University's Stern Business School tells Harvard Business Review. "You're left psychologically and practically without a point person."

Sooner or later, it will happen to you. Here's how to make sure you control your words and actions and avoid allowing emotion to overwhelm the situation.

Stick to the rules.

First and foremost, you have to know what your HR procedures call for, says Priscilla Claman, the president of Boston-based consulting firm Career Strategies. For any lower-level position, two weeks' notice is standard. But for higher-level employees, you might want a longer time period if possible. Claman tells HBR, however, if the employee quits out of the blue without giving you ample time, "you need to ask yourself: do I want this person here anymore?"

Bury your emotions.

It's usually not great for your mental health to bury your emotions, but things are different today--employees do not stay for 50 years after signing an at-will employment contract. Don't lunge into emotional "why me?" monologues. Suck it up, be professional, and take the news like a champ. Claman says "people come and go over and over again so it's important to maintain relationships." If they're a true talent, they deserve to go out and do other things. If you're cool about it, maybe they'll come back eventually, or refer a talented friend.

Don't offer a counter.

If the employee is the company's linchpin, find out why they want to quit and give a counteroffer. But if they just want to go, you have to let them. "Once the other person has gone through the thought process of leaving, it's hard to fully trust them again," Claman says. It's more effective in the long run if you let them go, maintain a relationship, and then "re-recruit them in a year," she says. If you can make their exit pleasant and supportive, they might just come back.

Control the message.

If the employee is crucial to your operations, Claman says, you should put your heads together and figure out a game plan for breaking the news to others. As the leader, it's probably best to do an all-company announcement in order to prevent gossip from spreading. And make sure you both agree on what's to be said.

Find an internal replacement.

This big departure can mean a promotion for another employee, or two employees if the role is big enough. "Talk to employees about their careers and opportunities for growth," Claman says. "Say, 'Frank is leaving. I want to talk about what that means for you. Is there something that Frank does that you have an interest in learning or trying?'" If there is no one with the chops, then get on the hiring plan quickly.

Look in the mirror.

Claman says if you're a great leader, you should never be "truly surprised" when an employee says she's quitting. "As manager, you need to be aware of people's interests and needs. You should know what they want to do. And you should be able to tell when someone is tired of her job, has aged out of it, is not engaged, or has life changes afoot--like a move or a spouse transfer--that make a resignation likely," she tells HBR. Think and reflect about what you missed and make sure it does't happen to another employee.