When stressful situations threaten your self-esteem, even a little bit sometimes, you protect yourself by lowering your self-awareness. You lower your self-awareness by making sure you get outside of yourself. Where do you go? You escape into the safety of dominant, not-having-to-think sensory experiences (food being one of them). In the process, you give up your long-term goals, especially your weight loss goal.