You must know this is a sin and he must fight these waswas from the shaytan. Avoiding mixing with females and transfer to a segregated school if possible. If this is not possible, lower your gaze.

If a boy whose brain is washed by pornography do if he accidently sees a beautiful girl in his study centre which is full of girls and his desires become very strong and he cannot control his desires and comes at home and watches pornography and masturbates and after that feels very much depressed and then wants to fight because of the extreme fitnah and his parents never understands him.

Masturbation |