When we feel bad, we often turn to others for help and support. And when others come to us in pain, we do our best to help them feel better. This natural cycle seems to be part of the human experience.

Now, two new studies suggest that trying to make people feel better not only supports them—it allows us to practice emotional skills that may help us with our own problems. While negative emotions feel isolating and personal, the best way to deal with them may be profoundly social.

Both studies also highlighted one skill that seemed to really benefit both other people and ourselves: perspective-taking, the part of empathy that involves understanding someone else’s point of view.

How helping others helps you

In the first study, 166 participants spent three weeks interacting on a social network the researchers created specifically for expressing and responding to distress. Before and after, they filled out surveys measuring various aspects of their emotional lives and well-being.

In the social network, participants could post and comment on other people’s posts. The platform trained them to leave three types of comments, representing different types of emotion regulation:

Validation, which affirms what the person was feeling. For example, “This sounds so frustrating! Sometimes it seems like one stress piles up on top of another.”

Reappraisal, which offers a different interpretation of an event. For example, “I think another thing to consider is…”

Pointing out thinking errors, such as black-and-white thinking or believing you can read other people’s minds.

The control group could only post their experiences and not see other people’s, more like using an online diary.

In the end, the researchers found that the more comments participants posted about other people’s problems—no matter what type of comment—the more the commenters’ happiness and mood increased and their depressive symptoms and rumination decreased over the course of the experiment. On the other hand, more active members of the control group didn’t reap the same benefits.

These positive changes were partly accounted for by commenters practicing reappraisal more often in their own daily lives. Responding itself—in other words, helping other people regulate their emotions—seemed to be training people in the very skills of emotion regulation. It didn’t seem to matter if participants helped each other with validation, reappraisal, or pointing out errors; the interaction itself was most important.

“Helping [others] regulate their emotional reactions to stressful situations may be a particularly powerful way to practice and hone our own regulation skills, which can then be applied to improve our own emotional well-being,” the researchers write.

These results “are particularly striking given that emotional support was provided through text-only interactions anonymously to strangers, with little to no possibility of a face-to-face or online personal relationship.”

How helping others helps them

A second study suggested that helping others regulate their emotions may not just be good for you, but may also be better for them, too—better than them dealing with their feelings alone.

Here, 45 couples came into the laboratory and were split up into two roles: target and regulator.

The “target” would view a series of distressing photos, like spiders or crying babies. The “regulator” saw the photo briefly. One or the other would decide on an emotion-regulation strategy to use: either reappraisal (reinterpreting the photo in a more positive way) or distraction (thinking about something else). The target performed that strategy and then reported how much distress they felt.

Ultimately, the regulators’ strategies worked better than the targets’. Targets viewing the disturbing images felt less distress when using their regulator’s strategies than their own—suggesting that, in the thick of negative feelings, our partners may actually know what’s best for us.

“The results are in line with other studies that emphasize the advantage of an outside perspective without a direct emotional involvement in reducing stress and improving emotion regulation,” the researchers write.

What skill do we need?

So, we seem to be good at helping our partners deal with negative feelings—better than we think we are, perhaps—and that may train us to handle our own pain. But what kinds of skills actually underlie this process?

Both studies point to the same answer: the skill of perspective-taking, which is the ability to put ourselves in someone else’s shoes.

In the second study, the higher the regulators scored on a survey of perspective-taking, the more effective their chosen strategies tended to be—in other words, the better they were at alleviating their partner’s distress.

In the first study, the researchers measured perspective-taking via a proxy—how often commenters used other-oriented, second-person pronouns (like “you” or “your”) in their comments. Here, the more perspective-taking in their comments, the more the comments were rated as helpful by the recipients—and the more gratitude the recipients expressed (e.g., “Thanks! This message made me feel better!”).

In addition, commenters who used more perspective-taking saw greater gains in their own reappraisal skills over the three weeks. When we practice taking someone’s point of view to help them solve their problems, we learn to become less entrenched in our own perspective—which might help us later, when that breakup or layoff seems like the end of the world.

All this suggests that getting out of our heads and into the heads of others—empathy, in other words—is good for everyone involved. And when we feel alone in our suffering, we can turn to others both for our own sake and for theirs.