I would recommend talking to a therapist or counsellor. Don't worry about it being something sexual - they listen to a ton of different things. Doctors and therapists have heard it all.
I also feel like I should mention that masturbation can be normal. I used to think I was wrong to do it because I came from a religious background. I thought masturbating meant I was some kind of deviant. And there was no internet porn back then so I wasn't even using porn. Now I realize I was just normal, and it was only my efforts to stop doing it that led to periods of overdoing it. I just mention that in case you are dealing with some kind of religious shame.