Patanjali said in the yoga sutras that we can maintain the serenity of our mind. They key is to understand which of the four situations we find ourselves in, and we choose to respond in a corresponding way.
The first situation we may find ourselves in is that other people are happy. The appropriate response is to be happy for them, by cultivating maitri or loving kindness or friendliness. As with most teachings, it is easier said than done. I remember one time when I joined a raffle, the winner’s name was called out. My reaction was not to be happy for this person. Instead, my thought was “why not me?” It does happen that when others are happy, we are jealous or envious, we compare or complain. It’s because we have this misunderstanding that when someone is happy, it takes away from us.
Maitri is like a muscle we need to keep using to strengthen it. We start where we are, and we practice. Think of someone you know who is happy right now, and allow yourself to touch that gentle part of yourself that is capable of feeling this joy sympathetically. It’s interesting that when it comes to the word sympathy or empathy, we often associate it with difficulties and challenges and hard times. But for this sympathy or empathy to be complete, we must also learn to feel as others feel when their feelings are joy and happiness. Now, think of everyone you know who are happy, and see if you can expand this practice of sympathetic joy, and you allow yourself to partake in that joy. We may begin to understand and even experience on a very physical level that happiness does not have to be personal. It is not necessary for something to happen to us for us to feel bliss and elation, we can generate the same feelings even if good things happened to someone else. Further expand this practice and think of everyone in the world who is happy, imagine that you are including everyone you do not know and will never meet, and you are also still able to generate that loving kindness towards them. Let your practice be so expansive that you are happy for everyone in the world who is happy.
Through practice, we let go of the mistaken notion that happiness works like a pie; that if someone is happy, our share of happiness gets smaller. Through practice, we understand that when happiness is shared, it multiplies. Through practice, we experience that when we are happy for others who are happy, we retain the serenity of our mind.