The first step in samskara (refinement) is to remove dirt from the mind. Envy is the stickiest dirt. We must be happy, when people around us are happy. That is the true test. The Ramayana says that Lord Rama was happy when joyous events happened to others around, as if they happened to Him. Krishna describes Arjuna as An-asuya (envy-less). What a great compliment to receive from the Master Himself! That is why Lord Krishna taught the mysteries of spiritual discipline to Arjuna. We must have deep Love for the Lord but also must be very careful not to become depressed with envy when others also love Him or get His attention and become attached to Him. We must always be vigilant to have love without envy.
We have observed and experienced this many times. We all have; to a certain extent the shat ripus the 6 inner enemies (Kama ,krodha, lobha, moha, madha, matsaryam)within us, being born as humans. We also realise them, but are unable to overcome. Though we know that these feelings bring about unhappiness in us still we continue to have envy towards others. I have realised and this has worked for me. When such feelings come to our mind, let us just take a minute to contemplate. Then we will realise that we are all a part of Him. All of us belong to the same entity. So how can we be unhappy if others get something which we think is better than what we get? We are all parts of one body. Each one gets what he has come for. Each one has a purpose in life which is different from ours, though ultimate goal of self realisation is the same, but paths to achieve that is different. Once we realise that we will always share others happiness and any way if one things it is easily said than done, then just think over, is your envy bringing happiness to you or increasing the negativity around you and is it really worth it? All our spiritual bank balances will slide down. Is it really worth it? Time to think and work on it