I would say the main thing is you can't shame yourself for doing it. Always, keep it positive, if you slip up and do it when you didn't want to, oh well you'll do better next time. The more you think about it to the more you're going to obsess over it. So, it will take practice but fill your mind with other things. The brain is like a muscle and the harder you work it the more growth you'll see.
Out of experience I can say I would do it like 2/3 times a day. I would definitely get annoyed sometimes, but then I'd just challenged myself to see how long I could go without it. If I went long great, if I didn't...oh well. I have a partner now and I still do it when they aren't around and we have sex a lot. We even joke about it.
I would say the main thing is don't be hard on yourself. I don't want to interfere with your personal beliefs but I would say turning to any religion isn't going to help much. They tend to look very harshly on sex and other things that don't fit "the perfect image". I personally believe there is a high power but more on the subconscious and energetic level, seems just as ridiculous to me as a man in the sky keeping tabs on you! And just remember the power (of god or whatever you pray to) is and always has been in you so you're more of capable of doing it with hard work and discipline, it may not be easy and you may slip up but that's all a part of learning. The main thing is you just don't quit!
Anyways hope that helps!