Bad day indeed. Had something similar before. Doesn't seem to affect you at the time - Gets you later on when you have time to think about it all.
The best thing you can do is take a day off to get your head round it. TBH, I'm surprised your boss didn't send you home.
I work long hours, but...