The second treatment of Hasad is that the person doing Hasad should consider that even though his wish is that the person he is jealous of should come to harm, but actually by doing Hasad he is doing exactly the opposite and bringing him great benefit. It is a natural concomitant of Hasad that it compels the jealous person to do Gheebat (backbiting), finding fault and slandering of the person he is jealous of, and by doing these he continues to transfer his own virtues into the account of the other person. This way even though while he wanted to harm the person he was jealous of, he actually ends up bringing him great benefit.
The core of Hasad is that a person loves material wealth, and worldly status and respect, so much that he can not tolerate seeing anyone else having it. So the third treatment of Hasad is that the person tries to remove the love of worldly wealth and status from his heart. The best way to do that is that a person frequently contemplates about how long am I going to stay in this world? Without a doubt a day is going to come when my eyes would close for the last time, and I will leave all this wealth, this status and all my material possessions in this world. After that day the only thing that is going to accompany me to the next world would be my good deeds. If a person contemplates frequently about this, then he would start noticing that his love for this material world and its symbols has started receding. And once his love for material possessions starts subsiding he will feel less jealous when he sees someone else get wealth or status.
Adapted from the talk "Hasad, a major sin" by Mufti Muhammad Taqi Usmani DB