I know how you feel, I used food for when I was happy, sad, mad, etc.
I bought the book "Conquer your food addiction" by Caryl Ehrlich and read it cover to cover and started recognizing my habits and let me tell you I rarely, if ever snack at night now, and I also have stopped eating when I'm sad or angry. Something from that book clicked for me.
She does have some diet plan stuff in there but I only cared about the behavioral aspect of the book. I won't lie- I did read it more than once and I pick it up if I feel like I might be started to use food for comfort- but I totally recommend it and I only paid a few dollars for it on Amazon
I kept reminding myself that after the food is gone- the problem is still there.