If you’ve ever felt as though you caught a co-worker’s or family member’s mood, it probably wasn’t your imagination. Emotions can be transmitted more easily than colds or flus – faster than the blink of an eye!

Research has found that upbeat emotions such as enthusiasm and joy, as well as negative ones, including sadness, fear and anger, are easily passed from person to person, often without either party's realizing it. Emotional contagion occurs in a matter of milliseconds, and it depends on an incredibly basic, even primitive, instinct: During conversation, human beings naturally tend to mimic their companion’s facial expressions, posture, body language and speech rhythms, without being consciously aware of it, explains John T. Cacioppo, professor of psychology and director of the Center for Cognitive and Social Neuroscience at the University of Chicago.

When it comes to this monkey-see-monkey-do dynamic, “the more expressive someone is, the more likely you are to notice that expression and mimic it,” Cacioppo says. “The muscle fibers in your face and body can be activated unbeknownst to you, at much lower levels than if you were to perform those movements yourself.” Those incremental muscle movements then trigger the actual feeling in the brain by causing mirror neurons – “a specific group of brain cells that are capable of [providing the basis for] empathy and compassion,” explains Dr. Judith Orloff, a psychiatrist at UCLA and author of “Emotional Freedom: Liberate Yourself from Negative Emotions and Transform Your Life” – to fire, conjuring up the emotion as if you were experiencing it naturally.

Another factor that contributes to this transmission of emotion: The way people express themselves through tone of voice and the words they choose. During a conversation, people have a tendency to match the emotional valence of their word choices – particularly when it comes to using negatively charged words such as “hate,” “anger,” or “sad” – with whomever they’re talking, according to 2014 research from Oregon State University. “Communication requires the matching of specific words and contents so people can understand each other,” explains study co-author Frank Bernieri, an associate professor of psychology at Oregon State University. “So it’s easy to see how the language that’s used could drive some part of this contagion process.”

The degree to which people become emotionally in sync with each other depends partly on the level of intimacy in their relationship. A 2014 study at the University of California-San Francisco found that mothers’ stressful experiences are contagious to their infants. And a 2012 study from Finland found that depression is highly contagious among teenagers within a certain social circle.

The Ups and Downs of Emotional Contagion

Whether it happens at home, work, school, a social gathering or a sporting event, this communicative dance is highly adaptive, experts say. For one thing, catching other people’s moods helps you understand them better. It also allows you to connect on a very basic emotional level by fostering empathy, and it has survival value, too, Cacioppo notes. For example, being able to catch someone else’s fear or sense of alarm could alert you to an imminent danger like an out-of-control truck that’s heading your way.

If anyone knows the positive power of this dynamic, it’s Darlene Batrowny, 55, a children’s book author and child development expert who divides her time between the District of Columbia and New York. On a Saturday morning in December, Batrowny was feeling groggy and cranky as she prepared for her biweekly Skype meeting with her mastermind group (peers who help each other brainstorm and provide support as they work toward personal goals); her group includes people from the U.S., Mexico and the U.K.

That day, a woman from Mexico told everyone she’d have to leave the call early for a job interview so she went first. When she began to talk, “I could feel my energy soar instantly – the emotion and excitement in her voice were totally contagious,” recalls Batrowny. “My tired, grumpy mood did a complete 360-degree turn, even though I was so very far away. I left the call that day with an abundance of energy and went on to have a really happy, productive day myself.”

But sometimes, emotions that are passed along aren’t so helpful. At a previous job, Melissa Masters had a co-worker who would harshly criticize other people’s ideas or opinions if she didn’t agree with them. “Her arms were always crossed, and she’d purse her lips when she didn’t agree with something,” recalls Masters, 28, now a public relations assistant account manager in San Diego. “I’m generally a positive, happy person, but her attitude rubbed off on me – when I was around her, I’d feel the negativity building inside me, and I found myself looking at the way things wouldn’t work rather than being encouraging or offering alternate suggestions.”

Believe it or not, even loneliness can be contagious. Research in the Journal of Personality and Social Psychology found that loneliness tends to occur in clusters –meaning, that lonely people tend to be linked to others who are lonely in social groups –and the phenomenon extends up to three degrees of separation within the social network. Yet, the 2009 study, which used data from the Framingham Heart Study, also found that non-lonely people who spend time with lonely people tend to become lonelier over time. “Loneliness spreads more easily among women than among men, and this holds true for both friends and neighbors,” notes Cacioppo, one of the study’s authors.

Catching the Right Moods

Generally, people don’t mind getting swept up in another person’s excitement, enthusiasm or good cheer. “That’s why it’s important to choose positive people [to be around] – it’s good medicine,” Orloff says.

On the other hand, few of us want to soak up someone else’s unpleasant moods or negativity as if we were sponges. Fortunately, there are ways to guard against that transmission. To that end, it can help to:

1.Trace the emotion to its original source. “You might ask yourself, ‘Am I feeling sad naturally or because I’ve been around people who are feeling sad?’” Cacioppo suggests. Recognizing whom the emotion rightfully belongs to can help short-circuit its transmission.

2.Manipulate your body language. Since emotions are often caught by mimicking other people's facial expressions and body language, try to keep a neutral expression on your face and a relaxed posture when you’re with someone who is tense or angry, Cacioppo says. It can also help to avoid eye contact, Orloff adds.

3.Recognize your limits. When you sense that you’re absorbing too much anxiety, sadness, irritability or negativity from someone else, “notice it, but don’t panic,” Orloff advises. Instead, breathe deeply, focusing on exhaling the negativity. “Or visualize an invisible shield going up around you so that only positive emotions can come in, and negative emotions bounce off,” Orloff suggests.

If that doesn’t help, pull the escape hatch by leaving the scene or taking a break (even if it’s to visit the restroom so you can regroup). Think of it as a way of coming to your own emotional rescue.