There is a beautiful teaching in Buddhism about the brahmaviharas or sublime states. They are also sometimes called the four immeasurables or divine abidings. They include: 1) lovingkindness, 2) compassion, 3) appreciative joy, and 4) equanimity. Cultivating the brahmaviharas guides our behavior and helps purify our minds of the afflictive emotions that obscure reality, hinder spiritual growth, and cause suffering.
There is a similar concept in yoga as well:
In relationships, the mind becomes purified by cultivating feelings of friendliness towards those who are happy, compassion for those who are suffering, goodwill towards those who are virtuous, and equanimity towards those we perceive as wicked or evil. – Yoga Sutra 1.33
Lovingkindness (metta in Pali) is friendliness and well-wishing – an attitude of benevolence toward self and others. Compassion is the acknowledgement of suffering and the desire to alleviate it. Appreciative joy is the willingness to celebrate beneficial qualities and circumstances wherever they arise, without jealousy or ill-will. Equanimity is an internal state of balance and calm regardless of external circumstances. Both Buddhism and yoga offer practices to help us cultivate these virtuous qualities for the benefit of all beings.
The first step to cultivating the bramaviharas is to develop the attitudinal factors and states of mind that support them. Strengthening concentration through meditation and behaving more ethically (ie. the yamas & niyamas of yoga) in daily life are a great way to start. This will build a firm foundation upon which authentic love can take solid root.
We can also engage in specific practices, such as setting a compassionate intention and dedicating the benefits of each formal practice session to all beings, engaging in lovingkindness (metta) or giving and taking (tonglen) meditation, and noticing and abiding with the brahmaviharas directly in daily life when they present themselves. With dedication over a long period of time, we may begin to discover that love arises spontaneously, with fewer and fewer limits, radiating out and sending beneficial ripple effects far and wide.
May all beings have happiness and the causes of happiness.
May all beings be free from suffering and the causes of suffering.
May all beings never be separated from the ultimate happiness that knows no suffering.
May all beings abide in equanimity, free from attachment and aversion.
– The Four Immeasurables (Buddhist prayer)