Regard it as a sin. Realise it brings the wrath of Allaah.
All causes and reason that lead to this sin, terminate these. Stop looking at porn, nudity and anything that encourages you to do this act.
Be regular in Salaat. Avoid thinking of loose things and fantasising about women. Fear Allaah.
Keep the company of the pious. Befriend good company.
Salaam mufti, I had a dream where our neighbours told us that our entire family and them will be going for umrah together, when we landed it was big market place my mum and all are shopping for small things...