first when you had to take a week off it wasn't your fault, then oversleeping from overdoing it to catch up is shit happens again not your fault. if you have bad study habits and let things pile up try setting a certain time each day to work just a thought and don't eat anything that gives you food poisoning
Try not to dwell on it, forgive yourself and try to start all over again today, I think your friend will admire you for it too if you can manage it.
In writing that I'm going to take my own advice too today