Imam khomeini thorugh his theological works explains the matter as following:
In any case, the person possessing this vicious trait suffers torments in this life, then the oppressive darkness and constriction in the grave, and will ultimately be helpless and wretched in the Hereafter. All these are the evil effects of envy alone, on condition that it does not breed any other vice or induce any other evil deed.
But it rarely happens that it does not generate some other affliction. Rather, it often begets many other moral vices and misdeeds, such as pride, as mentioned earlier, and other sins like backbiting, slandering, abusing, and torturing, etc., each one of which is a deadly and mortal sin.
Therefore, it is necessary for a wise person to make up his mind immediately and strive to get rid of this shame and indignity, saving his faith from the blaze of this fire and its disaster lie should rid himself of this mental torture and narrow-mindedness, which is it perpetual lifelong punishment in this world, followed by distress and darkness in the grave and the Purgatory, and incurs Divine wrath.
One should consider that a malady, which has so many, harms needs to be treated urgently. His envy does not harm the person of whom he is envious. It does not make him lose any of the favors and merits either. It may even give him some satisfaction, in this world as well as in the other, to see the distress of one who is jealous of him and is his enemy.
While he continues to enjoy all those advantages, which cause you distress and anguish, it is yet another gift for him.
And if you are again jealous of him for the second one, it will multiply your torment and anguish, which will again be a blessing for him, and so on. Hence you shall ever remain in grief, pain, and anguish and he in a state of bliss, joy, and exuberance. In the Hereafter, also, your envy will benefit him, especially if it culminates in backbiting, slandering, and other such acts of malice; as your good deeds will be assigned to him. You will be reduced to utter destitution and he will enjoy bounties and eminence. If you deliberate upon the matter for a while, you shall of course purge yourself from this vice and save your soul from its destructive effects.
Don’t think that psychic, moral, and spiritual vices are not curable; this is an erroneous notion that has been inspired in you by Satan and your carnal self, who want to keep you from treading the path of the Hereafter and to frustrate your efforts at rectifying your self. As long as man exists in this realm of transition and change, it is possible for him to transform all his attributes and moral characteristics.
However strong his habits may be, as long as he is living in this world he can quit them. The only thing is that the effort required to throw them off varies with the degree of their strength and intensity. A bad habit in the early phase of its formation, of course, requires only a little self-discipline and effort to eradicate it. It is like uprooting a young plant that has not run its roots deeply into the ground. But when a quality becomes firmly rooted in one’s nature, becoming a part of one’s spiritual makeup, it is not easily uprooted, but requires much effort, like the tree that becomes old in age, having sent down its roots deep into the earth; it cannot be easily extirpated. The more you delay the decision to eradicate the iniquities of the heart, the more time and effort it will require.
My dear, in the first place do not allow any moral vice, bad habit or evil deed to enter the realm of your inner and outer being. This task is much easier than that of expelling them after they enter, establish themselves, and start flourishing. And if they enter, the more you delay the action required to expel them, the more time and effort will it require, and they will corrupt your inner faculties in the mean time.