There are some steps that can be taken when envy does appear. These steps can protect the person from the envy of others and may also help in removing that envy from society.
When a person is afflicted and hurt by the envy of others, he should take the following steps:
(1) The person himself should repent to Allaah سبحانه و تعالى and ask forgiveness for his own sins. In general, one's opponents and enemies will not get the better of him except due to his own sins that he himself has committed. Allaah سبحانه و تعالى says,
"And whatever misfortune befalls you, it is because of what you hands have earned. And He pardons much." (Soorah ash-Shoora, 42:30
(2) The person should put his trust in Allaah سبحانه و تعالى. Whenever a person puts his trust in Allaah سبحانه و تعالى, Allaah سبحانه و تعالى suffices for him.
(3) He should seek refuge in Allaah سبحانه و تعالى from the evil of the envious person. He should supplicate to and seek refuge in Allaah سبحانه و تعالى as found in the next to last Soorah of the Qur'aan,
"From the evil of the envious one when he envies." (Soorah al-Falaq, 113:5)
(4) He should be just toward the envious one. He should not wrong the envious one and go beyond what is right in such a case.
(5) He should try to be nice and compassionate to the envious one. Envy is strongly related to hatred. When the envied one is very nice to the envious person, the feeling of hatred and jealousy is slowly but surely removed, by the will of Allaah.
[Commentary on the Forty Hadeeth of Imaam an-Nawawi رحمه الله, vol. 2, pp. 1034-1035]