How do you cope with emotional eating?

Options
I gained weight when I was going through a rough year and essentially only ate pizza and cake because pizza and cake are yummy. Before, I would regularly also just eat pasta and cheese. Needless to say, all those options are out now. But I comfort eat, I always have. And so when I get upset/triggered by something I badly crave something high in carbs and fat. When I do give in, I feel worse after (physically and emotionally guilty) so I wind up craving more bad foods.

What strategies do people use to avoid that kind of vicious cycle?

Example: a couple of days ago, I got in a fight with a friend and was craving pizza. I checked the Dominos/Pizza Hut websites and then decided to make flatbreads with cheese as a substitute. So I made the flatbreads and while they were in the oven, I did some quick cardio that wasn't as much as my flatbread pizza but at least I didn't feel quite as guilty. Problem is, now I have a ton of flat bread (when I'm craving, moderation doesn't seem to be much of an option). So many carbs just waiting for me! Bad, bad bad!

So I guess, in some ways I was heading in the right direction but I can't always make more food and sometimes I can't exercise either (health reasons). So how do people deal with cravings? Inspire me!