I am no expert on fasting. I have done a couple and I just wanted to post something that I think I have learned about thinking about food when fasting.
When I am fasting I find that thinking about food is an indulgence that I cannot afford. Every time I have went off my fasts early was because of my thoughts. If I am not eating then it serves no purpose to think about food.
The same goes for looking at food and smelling food. I don't linger in the supermarket or stores. I try not to encourge that kind of thinking when I am fasting. It's like a fast from thinking about food as well.
These thoughts are actually my cravings and I can learn a lot from them. I learn that they are stronger than me when I give in and listen and hang out in the supermarket just to look at a steak or if I go to smell the fresh bread in the bakery. I learn that these thoughts are the first step in the wrong direction.
This is the same thing with smoking, If I quit smoking and do not want to smoke ever again then it serves no purpose to think about smoking.
There is one drawback that I have found, I can't force myself to stop thinking about food. No matter how hard I try to stop myself it seems to get stronger. I solved this with a simple exercise, whenever I think about food when I am fasting I count. I keep going until the thoughts go away. It usually does not take more then 30 seconds.