The first trick is to notice you’re doing it: Is it out of boredom? A self-soothing activity? Or some type of mechanism for coping with stress and anxiety?
Try to keep a diary for a few days. Spot the patterns. When you notice your cues and responses, you’ll learn to pause before you eat, rather than doing it automatically.