Envy is one of the shitiest feelings in the world because it's petty and spiteful. The contradiction in feelings leaves you hurt and confused because sometimes you are truly happy for the person but at the same time so envious it's physically painful.
You are really and truly, happy for your friend because something fantastic is happening in their life, but at the same time you are so jealous of them that you want to scream. The jealousy starts you thinking about your own life which makes you sad and angry and leads to hostile feelings towards your friend and more intense jealousy which dissipates into severe guilt when you see your friend again.
No wonder it's a deadly sin.