I'd rather talk about how it's completely ridiculous that people teach others that masturbation is wrong, unhealthy, or a sin, but since you said not to, I'll try not to (too much).
But if I could just say a couple things...
1. You'd be far healthier if you masturbated and accepted it as normal, healthy, and something 95% of people do. It's far less healthy to worry about, have a negative image of yourself and what you do.
2. Your desire to masturbate is not in your mind. It's in your body. It's chemicals in your body that are natural and serve a purpose.
I could make one hundred points and say many things, but I'll leave it at those two. I'm guessing you're religious, so you believe that God wants you to be healthy and happy and that He created you and your body. Hmmm.
Anyway, if you really want to know how to quit masturbating, google some. I just hope that if you find yourself to be miserable, imbalanced chemically, and otherwise far worse off after quitting, that'll you'll work on seeing it as a positive part of a healthy and happy life.
If you want, you could look at some religious views that are NOT against masturbation...
http://www.sexinchrist.com/masturbation.ht
ml
You'll find plenty of links on how to quit (don't use this one please...
http://www.churchofsatan.org/masturbation.
html ), but I'm not going to link to them.