Masturbation if done correctly is not harmful. However, excessive masturbation, use of pornography, doing for relaxing down, etc is bad. You must follow a correct method while masturbation. Improper way can risk you for development of sexual dysfunction like early ejaculation, Erectile dysfunction, etc.
Next Steps
For more information and specific suggestions, you can also consult with me directly here on practo.
Health Tips
Kinda consult with a sexologist.