Wouldn't it be great if we could leave our emotions in the parking lot, or on the bus, when we come to work in the morning? Then it would be easy to handle any situation —no matter how maddening, threatening, or just annoying— with calm and dispassionate logic, like Mr. Spock in Star Trek.
Alas, that's not how humans are constructed. Instead, it's all too easy to react viscerally and, in the heat of the moment, shoot yourself squarely in the foot.
Let's say someone pipes up in a meeting with a great proposal you worked long and hard to come up with, and then described to a colleague you thought you could trust —only now he's claiming it as his own. You're stunned, hurt, and (understandably) furious. But bursting out with, "Hey! That's my idea!" will just make you look childish or worse. So what can you do, besides seethe quietly and plan your revenge?
Stop right there. The toughest part of any job, for many of us, is dealing with difficult coworkers. But, says career expert Kathi Elster, "the most important thing to understand is that you'll never change anyone else's nature. The only power you have is in how you respond to their behavior."
Elster is a partner, with Katherine Crowley, in coaching firm K Squared Enterprises. The pair has spent 30 years advising clients on work conflicts, bosses from hell, overdue promotions, and how to have a life outside work, among a myriad of other thorny dilemmas that can trip up a career. They've also written three books —including the terrific Working with You Is Killing Me: Freeing Yourself from Emotional Traps at Work— and host a weekly podcast, accessible through K Squared's web site, called "My Crazy Office".
By their lights, the only way to come out ahead in any debacle with a colleague is, first, to cool off, a process Elster and Crowley call "unhooking." Maddening as that idea-stealing coworker is, for example, take a step back and recognize that, right now, you are in no fit state to react. Instead, when you can, take a walk, or listen to music, or vent to a friend —anything that will relax you enough to help you think clearly.
A quick way to chill, from Working with You Is Killing Me: breathe in for three counts, hold it for three counts, then breathe out for six counts. Repeat this until you feel calm again.
Second, try to pinpoint "what role your own behavior might have played in the situation," Elster suggests. "Did you trust this colleague too much, and tell him too much in advance about your idea?" The point here, of course, is to figure out how to avoid repeating your own mistake (if any).
The third step: once you've had a chance to think rationally, Crowley recommends meeting privately with your sneaky coworker and letting him know you don't appreciate what he did. "Say something like, 'I know it wasn't your intention to swipe my idea, but can we at least share the credit for it?'," she says. Keep your tone reasonable and conciliatory. After all, he knows perfectly well that what he did was underhanded, so ranting and raving about it at this juncture won't get you anywhere.
An appointment for a three-way conversation with this person and your mutual boss wouldn't hurt, either. Use it as an opportunity to reiterate and expand on your proposal, starting off your comments with, "When I first described this to Joe, what I had in mind was..." just to clear up any confusion about where the original notion came from.
"Next time, you'll have to be ready to speak up in the actual meeting and say that," Crowley adds. "We call it the ninja response, and it takes some practice to 'unhook' quickly enough to get good at it."
Wait a second —next time? Unfortunately, yes. "It will probably happen again," she says, unless you just never confide your ideas to anyone at work ever again —and how likely is that? People who take credit for other people's smarts and creativity "aren't innocent, but they're not as devious as they seem," says Elster. "They're just super-competitive. They see themselves as more important than you are." Oh.
Of course, not all challenging coworkers are super-competitive. Some are saboteurs who seem like allies to your face but torpedo you when you're not looking; or supremely lazy, and often ultra-charming, types who somehow always manage to make you and the rest of your team do their work for them.
With any and all of these folks, the same approach applies: first, "unhook" emotionally enough to get rid of your (perfectly natural) hostility. Then take calm, professional action that doesn't accuse, blame, or otherwise alienate the offender, but that does achieve your aims.
It isn't easy. But dealing effectively with people who seem determined to keep pinging on your last nerve is a valuable career skill you're likely to need over and over again. "You dream of the day when everyone simply does his or her job and no one invades your space," note Elster and Crowley in Working with You Is Killing Me. "Dream on."
More must-read stories from Fortune:
—Yes, you can find a good job without a college degree
—Why is job hunting (still) so slow?
—What I learned in inclusion training at the world’s top cocktail festival
—3 ways to wow a tech recruiter
—How taking med students into coal mines helps lure new doctors to rural areas
Get Fortune’s RaceAhead newsletter for sharp insights on corporate culture and diversity.