Find other things to do that will occupy your mind. I find that going out and helping others is great, drink a cup of water when you think of food, it helps heaps, as hunger is often only thirst in disguise.
If you are needing to lose weight, or find yourself overeating, I have found real help in praying and claiming a promise found in the Bible. You don't have to know how to pray, just ask God to help you, and don't worry how bad you think you are, God loves to help bad people too!
After praying for help, quote a text such as 1 Corinthians 10:31, whatever you eat, or drink, or whatever you do, do all to the glory of God.
Another text is: Jude 24 Now unto Him that is able to keep you from falling, and to present you faultless...
Ephesians 3:20 Now unto Him that is able to do exceeding abundantly above all that we ask or think. (that's powerful)