Let’s say you’re on the beach, and you’re feeling pretty rad. You like your bathing suit, you’re having a good hair day, and if you had to rate your body satisfaction, it would be at a solid 8.

Suddenly you look-up from the selfie you’re taking, and you see two models walking down the beach trailed by photographers. Self-critical thoughts start darting through your brain, and your body satisfaction plummets.

Totally illogical, right? Those models existed before you saw them. You felt great about yourself while they were existing somewhere else. But as soon as they appeared in front of you, you felt terrible because you used them to create a new set of self-critical thoughts.

Psychological studies back-up the idea that constantly comparing yourself to others can have a negative impact on your mental health. Perusing social media, for instance, tends to prompt people to compare themselves to what they see others posting, and it’s correlated with an increase in negative emotions.

So if it feels so terrible, why do we keep doing it?

Well, a couple of reasons.

First, humans are a tribal species. Understanding your social standing has an evolutionary advantage. Being part of the group and matching other people was and is important to build connections and foster trust. So comparing yourself to others may have started out advantageous.

Second, society exacerbated this tendency. Most of us live in capitalist societies, where we are encouraged to regard competition as healthy and normal. We fetishize ideas like “survival of the fittest,” and we teach children that competition produces the “best and the brightest.” Your brain has been taught not only to compare yourself to others all the time, but to constantly be attributing an importance and weight to any differences you see.

In addition, capitalism teaches us to commodify ourselves and see ourselves as interchangeable. We’re taught to see ourselves as living in a series of marketplaces—the job marketplace, the dating marketplace, etc. Thinking of ourselves as commodities in a marketplace exacerbates the tendency to constantly compare ourselves to others, as though we are just a collection of parts or attributes that only matter based on how much they appeal to other people.

On top of this capitalist competition mode, we live in a patriarchal society where women are constantly encouraged to compare themselves to each other to evaluate their worth. We are encouraged to base our worth on external things like physical appearance and how attractive we are to men. We are also taught that male approval is a scarce resource and that women are in competition for it (there’s that capitalism again). So of course we are constantly comparing ourselves to each other.

Between capitalism and patriarchy, your brain is primed to constantly compare yourself to other people, but why do you so often find yourself wanting or lacking when you do that comparison?

The answer is simple: You have an existing belief system about your own lack of worth. You already believe you are inadequate, and your brain is constantly looking for evidence you aren’t good enough. When you compare yourself to other people, you assume they’re prettier, smarter, more successful, and better.

And why do you care if they are? Because you are conflating external circumstances with happiness. You think because someone else seems prettier, richer, has more kids, has a nicer house, or whatever else, that they are happier than you. When you look at someone else, and you tell yourself you’d rather be them, it’s because you think you would be happier.

But what have I taught you over and over? External circumstances don’t cause feelings. Someone else having a thigh gap, a giant engagement ring, or a successful business doesn’t have anything to do with whether they’re happy. Their thoughts are what determine their happiness, and they’re having the same thoughts as you are about the person next to them.

Ultimately, compare and despair boils down to 2 things to remember:

1. You only want whatever another person has because you’re telling yourself you’d be happier if you had it, or you’d believe you were more worthy.

2. What creates happiness and feelings of worth are your thoughts.

You already have everything you need to be as happy or feel as worthy as you imagine anyone else is or does, and it’s all already in your brain.