I have stopped watching video porn, which was a compulsive habit of mine, but now I look at images of women in bikinis or non sexually intended images of beautiful women, usually which appear as ads on websites, and I cant help but click and masturbate, and I have a slight obsession with the website pinterest, because I can obtain thousands upon thousands of "tame" images with fine details based on how I search it, and I look at dozens of images while I masturbate. I initially began giving up as part of a movement on the internet called "nofap" which is a non muslim run site which seeks to stop porn addiction and compulsive masturbation often for health benefits or better mental health or even attractiveness to women by analogy, and that was why i did it, but many also do it for religious reasons though proselytization or discussion of religion is discouraged except in the subforums for religious groups called "muslimnofap" "christiannofap" etc. but now I realize i should be doing this to please Allah.
however i fear i will not be able to do it. i need internet for work and school, and i also use the internet to obtain islamic interpretations for my dreams, but the two sites often contain triggering ads, and seem to contain any ads google sends them, and i also like to learn in my free time and often run across this. i am also an internet addict.
so it is not as simple as getting rid of the internet. what should i do?
بسم اللہ الرحمن الرحیم
In order to get rid of this bad habit:
1. First of all it is necessary that you pray two rak'ahs with the intention of “Salat al-Tawbah". After that, truly repent of the evil deeds and resolve not to do it again.
2. Pray to Allah Almighty for perseverance.
3. Exercise courage to act on abandonment of sin.
4. Ask for forgiveness from Allah Almighty and excessively recite: لا حول ولا قوۃ الا باللہ العلی العظیم
5. If you can afford it, get married and if not, fast more frequently. Totally avoid pornographic images and save yourself from looking at non-mahrams.
6. Ponder upon the external and internal harms caused by this evil practice and its detrimental effects on health.
a. Masculine power starts dwindling.
b. Lack of ability to properly perform in marriage.
c. In the Hereafter, such people will be raised while their hands are pregnant. العیاذ باللہ
7. Read the books written about this sin, for example; the treatment of immodest looks, or read books on virtues, deeds, etc. فضائل اعمال
8. Join the company of good people and elders.
9. When sinning, set an action on self punishment. For example, “if this sin is committed, I will give $50 in charity, or I will offer 20 rak'ahs of Nafl prayers, etc.” and persevere in your resolve. God willing, this habit will soon be gone.
10. Avoid loneliness until you break this habit.