Correspondence of Hazrat Moulana Shah Hakeem Muhammad Akhtar Saheb (rahimahullah)
Condition:
I have a very bad habit of envy. When I see any girl enjoying a bounty from Allah Ta‘ala, I become envious and constantly think to myself, “She is so fortunate that Allah Ta‘ala gave her so much.” I then have thoughts of ungratefulness.
Answer:
Envy in matters of Deen is permissible, such as when a person thinks, “I should also acquire that Deeni bounty.” However, you should never be ungrateful, as ingratitude is a serious sin. Think of all the bounties of Allah Ta‘ala that you enjoy, and make du‘aa for more progress by saying, “O Allah! I express complete gratitude for every bounty which You bestowed me with, and I ask You for more bounties in Deen.”
(Solutions to Spiritual Maladies for the Lovers of Allah Ta‘ala, pg. 351)