Unforced errors

Why is it so strange that a single unforced error can make you feel like a total piece of shit? To the point that I can't remember any W's making me feel as good as a loss (perceived or real) feels like. It sucks even more when the error was caused by my own doubts. Failing to address the doubts when they arise can be quite costly. Last Friday I bought down production twice in the span of two hours. I'm totally ashamed, no amount of apologies can offset how I feel right now. I know you've got to focus on where how to avoid this from happening in the future but my mind is not in that space right now. Although that is what I intend to focus on after I finish this. It's going to be a week long affair or longer to try and figure out a way to get ahead of this. The thing is I don't want any flaky tests that just put out polluting signals. From experience you just ignore them or if they fail just fix the tests itself. This has been an area of weakness for me. I do write unit tests but they are simply not enough to find out if something really is broken for the end user. This is going to be super short as I had force myself to write so that I can think things through. I think it has done it's job. Now I want to explore ways to mitigate this.