"We turn to food when we're bored, when we're stressed, when we're tired, and when we're lonely. We're using food not to fill a hole in our stomach, but to fill a hole in our heart."
—Dr. Rangan Chaterjee
Indeed, I've been guilty of this. In order to stop this almost unconscious bad behavior, first, we must be aware of it. That might be enough to prevent needless eating. If not, then decide on an alternative action you will take instead of eating, such as journaling, doing meditation, or doing breathing exercises. We can incorporate these relaxation exercises into our daily routine to increase our stress threshold.
Here are a couple breathing exercises that I've found helpful:
Inhale through your nose for a count of 4, exhale through your nose for a count of 4. When you do this, you basically slow down your breathing by half. This re-balances your nervous system. Keep doing it until you feel more calm and centered. You will get better with practice. You can learn more by checking out this video (water breathing starts at 4:10)
Wim Hof Breathing Method:
This breathing exercise makes me feel calm, focused, and awake after. It makes about 10 minutes. During that time, you're very actively engaged in the breathing exercise, so it's hard to think about anything else. You can listen to a guided session in this video.
If the stress is much heavier and or the hole in the heart is much bigger, then breathing exercises alone might not be enough. In that case, check out this article on The 7 Habits of Stress Resistant People.