Paper and pencil have a way of helping clear the fog. Quit blaming, and start accepting responsibility, but only for those things that you can really control. Things like the weather, the stock market, and your professor's choice of tie don't qualify. Try rewriting the story about your mistake as one about an opportunity to learn and grow. Our mistakes do not become historical markers.
Most people tend to remember the good things and let the other stuff go.
They'll forget your stuff too. Try not to take or make things more serious than they really are.