I have a pretty solid relationship with food, and I appreciate that because I know others do not.
But I am also an emotional eater. I find it helps if I acknowledge it: "This situation will look brighter after I have a cookie." If it does, win! If not, I consciously move on to another solution.
I love how you take ownership by clearly articulating the thought. I learned that as a parenting technique-to reflect the idea/emotion back to the child. I think it is so useful for us to do for ourselves because we engage the heart of the matter when we do.