Hi, the only treatment is to stop masturbating. As you said excessively masturbating I assume your habituated to pornography that is the only reason nowadays why many youngsters are facing lot of issues not only with their health but also their family life and career both have been spoiled.
Next Steps
The only treatment is to stop masturbation, and stop doing any activity that will lead you to masturbate.
Health Tips
You can consult a general physician or clinical psychologist to help you in this.