It sounds like you've been through a lot! But, it also sounds like you are aware that emotional eating brought you to a weight you don't want and I imagine that being mindful and aware of the tendency toward emotional eating might just help prevent you from staying in those bad habits.
I'm also an emotional eater and I've been through a tough year (not in the same way as you, but tough in my own life) and gained a bunch of weight. I'm in the process of trying to lose it now, but finding it really difficult to avoid the bad habits. On my more successful days/weeks, I find that focusing on something pleasant, but healthful, when I'm feeling low helps sometimes. But, the worst is the feeling of acknowledging how far I've let myself go. But, dwelling on the mistakes that have brought me here has been more of a deterrent than a motivator. If at all possible, I'd suggest focusing on your goal in positive ways instead of focusing on how you got to a size you didn't want to be.
Not sure if my advice is helpful, but I definitely sympathize with your situation as I'm in a similar one myself. So, you're not alone.