How to overcome a lust for worldly pleasure or forbidden matter:
Every person can overcome a lust for worldly pleasure or forbidden matter, as every person is in control of his actions, speech and thoughts. This can be accomplished by one telling himself that the giving in to any pleasure or forbidden action separates one from G-d and I do not want to be separate from Him for any moment, and on the contrary, I desire to attach every fiber of my being to Him. In fact I am even willing to give up my life for His sake, and certainly I should overcome a much smaller challenge which is not involving me giving up my life.
 Tanya Chapter 14