Comfort food 😔

Any tips on how to kick the habit of eating every time I'm bored, upset, mad, etc.? Since I got clean over a year ago when i was pregnant I turned to food as a substitute and have gained weight. I'm really unhappy with myself and would appreciate any advice