Food journal? Meal plan? Make it a point to do something active when your thoughts turn to food? Look at obese pictures on the internet? ha ha jk on that last one.
I know how you feel, but I think it comes down to re-training your brain and doing what is best for your body, which you want, or you wouldn't be asking.
When I am thinking about food, or what is in the kitchen and it isn't time to eat, I do meal planning. I will look up delicious recipes with those ingredients online and plan for the next meal, day or week. After it it is all said and done I enjoy the food sooo much more this way.