I went through this exact thing last summer, with the nice addition of throwing up for two weeks, all grief related.
Partially, you just have to accept it. Don't try to escape, just realize that it's going to be a short period of time in the total span of your life and if you feel like shit, you feel like shit. Don't bother with a bunch of "feel better" techniques. Just be in the moment and then the moment will pass, instead of avoiding it and dealing with it later.
On the eating side of things, if this happens again do go with the shakes. You can pack 1000s of calories in a couple of them and at least that way you wont loose to much. For my case, that didn't work because of the getting sick thing, so I just ate steak and burritos for about a month because they were the only thing that tasted good enough to eat, yet would also stay down.
Also, if you can (have been able to keep some food down), do cardio. Because it's very repetitive for a long amount of time, it forces your brain to turn off somewhat and several studies have shown that it has more lasting effects on eliminating depression than medication.