We tend to be the hardest on ourselves, more than we would be on anyone else on our or their worst day.
We tell ourselves that we are stupid for making an error, when really we aren’t stupid we just made an error because we are human. If someone else had made the exact same error we wouldn’t say that they are stupid, we would just point out that they only made an error.
So you made an error, own up to the error, fix it if you can, and move on. You’re intelligence is NOT tied to this one action.