Here are some excerpts from an article on www.chabad.org that deals with recovery from addictions.
Rabbi Benyamin Bresinger has worked with addicts for twenty years. He is the creator of a national seminar which integrates kabbalah and the 12 steps of Alcohol Anonymous, and the director of Chabad Project PRIDE, an addiction crisis drop-in center in Montreal.
(For our purposes, substitute the words "drugs" or "food" below, with the word "Lust").
As an observant Jew, and especially a Rabbi, I am exposed to prayer and praying on a regular basis. Yet, I learned one of my most favorite prayers from a recovering crack addict. He told me that whenever he feels the urge to use drugs, he closes his eyes and prays: "Please G-d, help me find in You what I am looking for in the drug."
The Kabbalists teach us that nestled within every created thing is a spark of G-dliness. When the human body hungers for a piece of physical bread, this is but a reflection of its soul's craving for the spark in the bread. The craving is coming from the holiest place within each one of us -- our soul.
The very fact that we have this yearning is powerful proof of how G-dly we really are! Our prayer is a way to ask for Divine assistance; we're asking to be able to discover what it is we are really looking for.
So next time you feel a pull, an urge to use -- stop, close your eyes, and ask G-d to help you find in Him what you're looking for in that desire.