You’re at the post office on your lunch break and the line’s moving in slow-mo, so you reach for your phone to pass the time. As you scroll through one cranky tweet after another, your grouchy mood amplifies. Though you may attribute your increasing agitation to the drudgery of snail mail, there are other factors at work. Negativity spreads like a virus on social media—and you can catch it in the blink of an iPhone.QUIZ: Test Your MoodA couple years ago, mathematicians from the University of Vermont developed an algorithm to analyze billions of words in the tweets of 63 million users. They scored each word based on whether it skewed more negative or positive and plotted the findings on a graph published in the journal PLOS ONE. The researchers concluded that global happiness levels are trending down—at least according to our tweets. What’s more, a 2013 study from researchers at Penn State University found that negative messages on Twitter spread more rapidly than positive ones. The researchers looked at opinions about the swine flu vaccine, a controversial subject, and saw that anti-vaccine tweets begat more anti-vaccine tweets, whereas pro-vaccine tweets did not. In fact, too many positive tweets had the reverse effect: They made followers tweet more negatively. “If someone is aggressive in what they write, the next person is inclined to be more aggressive in further comments,” says Eric Langstedt, Ph.D., assistant professor at Mount Saint Mary College in New York who studies impression management on social media.To counteract the emotional domino effect, some psychologists recommend limiting what you view on social media. “It’s hard enough to focus on the positive, so you don’t need a barrage of negative news and negative information,” says Galena Rhoades, Ph.D., psychologist and research associate professor at the University of Denver. “If you’re more selective in what feeds you follow, you can make a choice to receive more positive messages throughout the day.” Another study by the University of Vermont researchers revealed that happy tweeters tend to follow and be followed by other happy tweeters while sad users are more likely to connect to each other. Add more people who inspire you and add more personal interest categories such as travel, healthy cooking or hiking. Unfollow those who rant daily.MORE: Banish Negative ThoughtsOnce you’ve filtered whom you follow, turn your attention to when. Tuesday is the most negative day for tweets, according to the PLOS ONE study, while happiness spikes—no surprise—over the weekend. Timing can be crucial, down to the second. It’s a good idea to pause before you reflexively tweet something in the heat of the moment. “An angry tweet can be taken down, but all it takes is a screen shot to make a post live on forever,” Langstedt cautions. “If you’re about to create an angry or upset post, wait until you’ve had a night’s sleep. If you still wish to post in the morning (which often, you won’t) hopefully it will come from a more rational, less emotional place.” Sound too hard? Try to give yourself a set time limit—a half hour if you can stand it—before responding to charged-up personal messages or retweeting negative news. It may keep you from posting misinformation, false rumors or something you’ll regret later.While it can be great to stay connected and see what’s going on in the world wherever you are, it’s also all too easy to let social networking infringe on your in-person relationships. “If you go out for sushi and you’re waiting for a table, engage with your partner rather than checking Facebook or Twitter on your phone,” Rhoades says. “Protect your time together from those influences.”MORE: The Digital Assault on IntimacyFinally, beware the posts that appear pretty positive, but breed ire and envy. As you click through pictures of a friend’s luxe beach-house wedding or month-long trip through Europe, try to remember that you’re only viewing the stuff he or she wants you to see. “People kind of take on a role in social media space, almost like an actor,” Langstedt says. “We may feel worse about our own lives because we’re only viewing an idealized version of our friends’ lives.” Rhoades warns that this can lead to unfair comparisons and negative self-talk. Resist the urge to post a snarky comment, and instead write something nice. “When you express positivity toward the other person it can improve your relationship,” Rhoades says. Maybe you’ll even get an outpour of support the next time you get the urge to photo brag.