Google pranayam and study breathing exercises. Do deep yogic breathing or abdominal breathing.This will help you to reduce frequency of masturbation.
For mastering urge to masturbate is possible if you replace it with deep breathing or abdominal breathing. In fact you can control any emotions with breathing exercise called Pranayam. Google pranayam and study different breathing technique. Master few techniques and use it to control the urge by taking few breaths. With this techniques, you can at least reduce the frequency of masturbation.Google pranayam or abdominal breathing.
It comes down to you making a decision to stop masturbating, if that's what you want to do, and then following through with that decision. If you have a partner, that could make things easier.
What is your problem? Everyone, men and woman married or single masturbate. It's completely normal.