I did a 24 fast the other day so i experienced plenty of thoughts about eating.
If you are resolved to stick to your plan, as i was, then its easy enough to find things to distract yourself with. I found lots of small easy activities to do and took regular breaks between my lazy activities like playing backgammon online or watching a movie and even took an afternoon nap. Keep breaking up time. A bit of cleaning, a few garden chores. Keep the boredom at bay since that's largely also why we feel like eating all the time.
But ordinarily, if i am hungry, or really struggling, i would go for low calorie foods. Even if you have to have a sandwich. Just keep it as healthful as possible. Soeimtes i have a cheese sandwich, or a bowl of fruit salad, All depends on how bad the cravings are and what will do the job.
Bascially if i eat real food, i won't feel i've let myself down to the point where i quit my diet and go the whole hog. But if i do then generally its all over for me. I know many here would not think a cheese sandwich is healthy or diet food, but in my book it is. wholegrain bread, not much butter if any at all, and a couple of slices of real cheese. Not plastic cheese or low fat cheese. Food has to taste good.