Diverts your attention
I can't believe I'm quoting from an Islamic Forum. Nonetheless, I think these excerpt from a forum discussion have some educational value for us. It makes us feel all the more responsibility in these areas, for if even these people, who are called "Am Hadomeh Lachamor" are expected by their religion to stay clean from masturbation, how much more so are we Jews, as G-d's holy nation, required to guard ourselves!
THE RULING REGARDING MASTURBATION
Masturbation is Haraam (unlawful). This is the ruling of the four Madhaahibs viz. Maliki, Shafée, Hanafee and one riwaayah (narration) from Imaam Hanbalee. They have drawn their conclusions from various proofs. I would recommend any person who is involved in masturbation to keep roza (fasting) because it controls ones sexual desires. If you think you cannot fast, then you should do some exercise and no doubt exercise does keeps ones sexual desires under control. Their are many bad side effects of masturbation and there is a medical report which throws light on the symptoms of masturbation. I hope my brothers will avoid doing it. Believe me brothers i have seen some people who have destroyed their future by getting involved in these kinds of bad activities, it is just like drug addiction, If any person who thinks that if he does masturbation once a week or month then it will not harm him but this is not true because most of the people who do excessive masturbation are those who use to do it once a month but later they got into its habit and ruined their lives. I would recommend those who want to get ride of masturbation, to do exercise when ever you feel like masturbating, it surely does controls sexual desires, and diverts your attention from masturbation as soon as this evil strikes your mind.
Taken from www.tikunhabrit.com