Is there anyone in your office you could ask for a real life hug?
I like the writing suggestion. Besides creative writing, there's also journal type writing. Ask yourself a bunch of questions like: Why, exactly, am I stressed? What other feelings am I experiencing? Is there anything about this situation that is good or helpful or a learning experience?
Of course, a good distraction at work is work. Is there some project you've been putting off that you might as well start now when you're feeling crappy anyway?
Also, I don't know if this would work for everyone, but when I really want to eat something for emotional reasons, I start thinking about the next thing I have on my plan to eat. Sometimes, it's just helpful to know where that next meal is coming from and exactly what it is and think about how good it will taste while being good for me.