FORTUNE — It’s all too familiar — that sinking feeling in the pit of your stomach when you discover that the promotion you have been vying for went to a colleague with less experience and fewer years at your company. You’re consumed with envy, and while it would be great to end the day with a “best-man-won” handshake, it rarely goes that way.
Scott Crabtree, 46, founder of Happy Brain Science, recalls the feeling when he was holding down a managerial position at a tech company when his new hire negotiated a salary that was just a few thousand short of his current pay. “I realized he was going to get a salary right out of school that took me decades to reach,” he says.
Crabtree, who had schlepped his way through numerous low paying and less glamorous jobs, grew resentful of the subordinate who’d essentially taken a short cut to a very high-paying position. “Feeling bad resulted in me putting in less effort.”
MORE: When Salman Khan met Bill Gates
Crabtree grew depressed at the prospect of having to manage someone whom he was so envious of and this ultimately forced him to seek job satisfaction elsewhere. He eventually founded his own business, which he says stemmed from the realization that the constant comparison to others only created unhappiness – and, of course, unhappy employees yield less return on investment for the company.
So if hostility and job dissatisfaction is the end result, does this mean that envy is always a bad thing? Not quite.
According to a 2011 study called “Why Envy Outperforms Admiration,” if channeled appropriately, envy can motivate people and boost productivity. Researchers Niels van de Van and Marcel Zeelenberg separate envy into two categories: malicious envy, which seeks to condemn and remove the competition, and benign envy, which is the desire to emulate and admire the competition.
At the heart of envy is comparing oneself against others, and van de Van and Zeelenberg’s study of benign envy asserts that comparison can drive someone to work harder to achieve more impressive goals.
Take professional sports. “In essence, part of your job as an athlete is to look at how the other guy is performing and to try and outdo them,” says Ben Bratton, 27, a professional fencer and gold medalist in the 2012 Kiev World Fencing Championships.
In Bratton’s line of work, the competitive drive to reach the national, world, and Olympic levels separates the champions from the runners-up. That envy, that aspiration to best your competitors, does not have to be malicious.
MORE: 5 things business can teach Washington
“When you are happy with your performance, then it is hard to be motivated to work harder and to do more,” says Art Markman, psychology professor at University of Texas at Austin. “Instead, you need some discomfort to push yourself to a higher level of achievement. Athletes often do this by finding a rival and setting the goal to outwork that rival.”
Bratton admits that he went through a period of self-doubt when he saw his teammates rank higher in the standings. “I was letting other people set the standard for me. The thing is, being consumed with negative feelings about a peer does nothing but take your eye off the ultimate prize — your own success,” says Bratton.
When Bratton saw his teammates reach a higher plateau, he says he realized how badly he wanted to be where they were. Instead of being consumed by the envy, Bratton was able to put a positive spin by asking himself, “What are they doing that I’m not doing? By letting go of my jealousy I raised the bar for myself. The results were almost instantaneous,” he says.
Since success is often dependent on how people work in competitive environments, Markman says that this sort of thinking has value beyond athletics and certainly in the business world. “There are two ways to apply it. First, looking at the successes of rival companies can help galvanize motivation within a company to achieve a new goal. Second, when individuals within a company focus on what they have not yet achieved in their careers, it spurs them to want to move upward through the organization,” he says.
MORE: Stop checking your email, now.
Not everyone agrees that using an athlete’s standard of excellence is really the best solution for companies, though. Halley Bock, president and CEO of Fierce, Inc., a leadership and training development company, has seen the failures when managers pit teams of employees against one another to improve the company’s bottom line. “It harms employee relations, it lowers engagement, and it stifles innovation,” she says.
Still, there is something to be said for training the mind to rethink competitive losses, and although the results may vary based on the environment, success hinges on how a person responds to his or her rivals (the internal and external).