That habit is comparing yourself to other people. Science
suggests there's one key reason why it's not a great idea:
People can seem a lot happier and less troubled than they
really are.

For
the study, which was published in 2011, researchers at
Stanford University, Syracuse University, and the University of
California, Berkeley, conducted a series of experiments around
people's ability to accurately assess others' emotional lives.

In one experiment, university first-years underestimated the
number of negative emotional experiences (like having a fight or
feeling homesick) and overestimated the number of positive
emotional experiences (like going to a fun party or hanging out
with friends) their peers had recently gone through.

Even when another group of first-years was asked to make similar
estimates for people they were close to — friends, roommates, and
romantic partners — they were way off.

Perhaps the most troubling study finding is that university
students who really underestimated the number of negative
emotional experiences others were dealing with reported lower
well-being.

Of course, the researchers can't say for sure that misjudging
others' emotional lives directly causes a decrease in well-being
— it could also be that people who are feeling bad may assume
everyone else is feeling great. Or, the relationship might work
both ways: Feeling bad leads you to think everyone else is
feeling great, which only makes you feel worse.

As a
Slate article pointed out right after the study was
published, our social media experiences might only exacerbate
this phenomenon. When all your friends are posting photos of
their happy families, and law-school admission letters, and
exotic vacations, it seems reasonable to assume that they're
having a whole lot more fun than you are.

But when it comes to social media as well as IRL interactions,
you're probably only seeing a curated version of everyone else's
lives. Keep that in mind the next time you feel alone in your
struggles — chances other that other people have been there too,
and might even be able to provide some guidance.