It is good that you want to be religious. Religion can be a very power anchor to balance your life. In my religion (Hindu) there is a saying Karam Kar, Fal Ki Chinta Mat Kar (GOD SAYS TO US: Do the Deeds for the sake of the deeds, Don't worry about the rewards. ) All The BEst
I want to go to heaven and the sexually immoral according to the Bible don't go there, so I am trying to walk in God the Holy Spirit and not in the fleshly sins. Jesus is my Lord and Savior and loves me a lot and I want to please him.
There are two books that helped me along this journey to be free of PMO - Everyman's Battle and Surfing for God. Both are Christian based books that gives you things you can do in your life to defeat this.