Asalaamu'Alykum,
I have copied this from another thread:
Question:
I masturbate even though I fear Allah's punishment and even though i know it is unlawful. I have tried to abandon it, but I end up returning to it often. Please advise me: How can I rid myself of this habit?
Answer:
Masturbation, inciting ejaculation by using one's hand, is unlawful: its harms are great, a fact that many doctors have pointed out. Allah Almighty says describing the people of faith:
"And those who guard their chastity (i.e. private parts, from illegal sexual acts. Except from their wives or (the slaves) that their right hands possess, - for then, they are free from blame; But whoever seeks beyond that, then those are transgressors."
[23:5-7]
Masturbation goes against those qualities that Allah Almighty described the believers with: it involves transgression against one's own self. Whoever practices it must abandon it, replacing it with what the Prophet prescribed:
"O group of young people, whoever among you is able to marry, then let him marry, for marriage is more modest for the eyes and safer for the private part. If someone is not able, then let him fast, for it is a shield (against desire)."
Sahih Al Bukhari no. 5066, and Muslim no. 1400.
By applying this prophetic advice, anyone can - by the will of
Allah Almighty - overcome this wicked habit. Moreover, there is no harm in asking a doctor to prescribe some kind of treatment for someone who is neither able to fast nor abstain from this wicked habit. In an authentic Hadith, the Prophet
said:
"Allah Almighty has not send down a disease except that he has also sent down for it a cure; he knows it who knows it, and he is ignorant of it who is ignorant of it."
Ahmad 1/413 and Ibn Majah no. 3438.
The Prophet
also said,
"O servants of Allah, seek cure (from your ailments), but don't seek a cure by unlawful means."
Abu Dawud 3055 and at-Tirmithi no. 2038.
We Ask Allah Almighty to protect us and all of the Muslims from all that is evil.
Ibn Baz
Fatawa Islamiyah Volume 9
Again i mentioned this in another thread but its worth installing this free filter, you need to submit your email in order to receive the licence via email. Very good:
http://www1.k9webprotection.com/getk9/index.php
Walaykum Salam