The ruling on masturbation is a matter of disagreement. Some scholars say it is lawful, others say it is not preferred, while a third group of scholars says that it is unlawful.
The most likely of these opinions - and Allah knows best - is that masturbation is something that is not preferred. In case of a dire need, it becomes lawful, but resorting to it excessively can result in serious problems.
It’s most serious harm is that the young man who does it feels a severe regret – particularly if he is pious – hates himself and can become afflicted with depression. It may lead him to weakness in strength, particularly if he tries to give it up and fails.
It is worth saying that even if it is deemed to be unlawful, it is a misdeed such as other misdeeds that could be expiated by repentance and asking Allah for forgiveness.
The young people who do this should not let themselves fall into depression and go too far in blaming themselves and wallow in feelings of deep sadness. It is surprising that many people do sins more serious than masturbating – such as lying, backbiting and sleeping through the time of Morning Prayer – but they do not blame themselves with a fraction of the blame they feel after masturbating.
In fact, they deal with masturbating too sensitively, which affects their other aspects of life like dealing with others, their education or their worship.
It is preferable to deal with everything fairly, as Allah determines everything in a balanced way.