Sometimes in life it's natural to feel a little envious, rather than feeling happy for someone, as you know you "should". If you're feeling like that: ask yourself this following question:
What would I gain from this person not getting such and such?
When you phrase the question like this, its pretty clear that you don't gain from someone else's loss.
The unspoken assumption when you get jealous, is that what someone else got was meant to be ours, but got re-rerouted to them by some cruel mistake. Of course, when you say it out loud, you recognise how ridiculous that sounds.