Thank you for asking. You must understand that masturbation can be addictive. The treatment is like managing any other addiction problem. It would require medications and specific instructions. Most importantly, it is completely treatable. However, you must consult with a sexologist.
Next Steps
For more information and specific suggestions you may ask a detailed query here on practo.