Definitely can't eat when anxious.
First instance was my first week or two of technical school. I couldn't eat breakfast and had dry heaves before driving to the school. But during the morning break I could treat myself to a nice donut and Pepsi. (Yuck, I know now.)
But then in the last semester of college, I went to see a doctor about it. I went for an upper GI series (X-Ray with barium contrast) to check for hiatal hernia. I could barely drink the thick barium drink; it was the first of many medical foibles I'd experience. Then I started to see a therapist.