As children we are taught the importance of being kind to others and practicing compassion. We’re taught the Golden Rule: “Do unto others as you would have them do unto you.”

In classrooms and seminars, this guideline for living is drummed into our heads and our habits. It teaches us to empathize, to walk in one another’s shoes and act in a way that improves society.

In all of these scenarios, the act of doing good is largely framed as a service to others. But science suggests that kind actions may actually have a selfish benefit.

According to research, good deeds can improve your mood and fortify your health. Think of it like your body’s response to karma; it’s hardwired to reward you for being a good samaritan with numerous positive health effects.

One study found that doing good deeds reduced anxiety and social avoidance in individuals who suffer from high social anxiety. At the end of the four week study, researchers found that the group assigned to complete acts of kindness showed significantly fewer indicators of anxiety, and even reported greater relationship satisfaction. While more research needs to be done in this area, the study is a promising signifier that the key to your own happiness may just lie in helping others achieve theirs.

Science also suggests that being kind may have the power to lower your stress levels. A 2015 study asked participants to record any casual acts of kindness (for example, holding open a door for the person behind you) that they engaged in during the day, as well as any perceived stressful events that they experienced. When scientists compared the individuals’ actions to how positively or negatively they ranked the day, they discovered an interesting pattern: More kind actions correlated to more positive experiences. In fact, the study concluded that even small acts of kindness helped to combat the effects of stress in a given day.

Research also links compassion to some more surprising health effects. It turns out that “heartwarming” actions may, in fact, “warm” your heart — and could even help you live longer.

You know the feeling you get when you do something nice for someone else? That causes your brain to release the hormone oxytocin, also known as the “love hormone” or “kindness hormone,” which is associated with increased trust and social bonding, according to Dr. David Hamilton, Ph.D., the author of 10 books on kindness and the relationship between mental and physical health.

This can have numerous positive effects on your body. “[Oxytocin] is good for the heart because it can reduce blood pressure. It also slows aging, partly due to anti-oxidant and anti-inflammatory effects,” Hamilton tells Thrive.

True to its name as the “love hormone,” oxytocin can also encourage feelings of closeness with others — so when you make a kind gesture, you’re helping to strengthen your relationship with the person on the receiving end of it.

The future of mental health treatment may even be rooted in compassion. One study analyzed the role of compassionate care in mental health practices, and found that kindness is linked to patients’ well-being. Though the study hesitated to make strong claims, it concluded that compassion should play a greater role in shaping mental health practices in the future.

It’s easy to rush through our lives, focusing solely on ourselves and what we have coming up next on our schedules. But the science proves that we’re much better off if we pause to consider others, and to take the time and effort to be kind however we can. It will have long-term benefits for our physical and mental well-being — even more reason to follow the Golden Rule.

Follow us here and subscribe here for all the latest news on how you can keep Thriving.

Stay up to date or catch-up on all our podcasts with Arianna Huffington here