Sadhguru
Why do I feel bad when my friend succeeds and also when he fails?
Jealousy is a self-defeating mode
If you are sad when your friend does not do well and even sadder when he does very well, you have fixed yourself in such a way that you cannot be happy whichever way it goes. This is a self-defeating mode.
If your friend does not do well you feel sad, and if he does very well you feel very sad. You have set yourself up so that, either way, you cannot be happy.