"Be happy for those who are happy".
It sounds so easy and straight forward. Yet this mind set can be incredibly challenging and tricky. I myself have been struggling with this recently and need to get myself out of this destructive funk.
In Sanskrit, this virtue, the cultivation of friendliness towards those who are happy, is called Maitri. In Buddhism, Maitri, or Metta in Pali, is one of the Four Immeasurables, or sublime attitudes (the others being Karuna, Mudita, and Upekkha). Patanjali's Yoga Sutras also describe Maitri along with the other attitudes. He states that when the virtues are practiced consistently, our minds become calm and steady. While it is easy to say "I'm happy for you", to actually mean it is quiet a different thing.
Consider your coworker who recently received recognition. Were you happy for him? Or did you question the recognition and feel a twinge of jealousy? Or maybe the yoga student next to you in class was able to effortlessly rise up into a supported headstand while you struggled to maintain balance. Were you happy for her success in the pose? Or did you become competitive or envious of her? It's almost an impulse to react in such ways; however these mind sets are toxic to our well being.
According to B.K.S Iyengar, jealousy, envy, resentment, and all those negative emotions that come up actually drain energy from us, shrinking and hardening our emotional beings. On the other hand, if we full heartedly feel happy with our friends, coworkers, etc. we strengthen our own internal happiness. The more we look for happiness, the easier it will be to find and integrate into our lives (conversely if we dwell on jealousy or the injustices of the world, our view of the world will be tainted by those emotions).
But how the hell do we cultivate happiness for others when our immediate reaction is envy, jealousy, or even anger? I believe the answer to this is two fold.
First: We have to create a friendship with ourselves. It is impractical to say that we will have joyous relationships with others if we do not first have one with ourselves. We need to be happy with who we are and allow ourselves to celebrate our own victories; finding joy in ourselves. Of course we can take this to the extreme and become egotistical and self-righteous which would defeat the purpose. However, finding that balance between happiness with yourself and the desire to improve will greatly benefit your relationships with others.
Second: Practice. And like all things we practice, we are not going to be very good at first. When a situation arises and you catch yourself feeling jealous, envious, or any of those destructive emotions, pause. Take a moment to observe your reaction. Notice how your body feels when you experience those emotions. Then ask yourself, "what am I really upset by?", "Why am I comparing myself with this person?". After you explore your body's response and your thought process, see if you can find a sense of happiness. It might be a very small pulse of happiness at first. But slowly, with repetitive nourishment, this feeling will begin to grow and eventually happiness will overtake the envy, jealousy, and anger and become your new reaction.
So look for happiness. Dig it out from underneath the negative emotions. Put forth the effort into being happy, both for yourself and for other people. As a result you will have more emotional energy, healthier relationships, and you may even begin to receive some of the joys those around you are celebrating.