emotional eating

Options
Even though I over eat when I'm bored and later at night, I find that I don't eat when I am emotionally upset. I tend to live on coffee at that time. But I start eating ( alot more than I should) when things get better. And having type 2 diabetes, I know that is NOT good. What can I do to eat when I'm upset when I sometimes feel physically ill?