Mistakes are committed by everyone. That's not the excuse itself but that helps us in making ourselves understand that everyone can go wrong at some point of time. And that you had gone wrong as well. Whatever you tell yourself, at times, it becomes definitely difficult convince yourself. At those times, what might help is to punish yourself.
Punishing yourself is easier than forgiving yourself. Yes, it is definitely so. It also helps in getting down that regret feeling which otherwise pinches you at every possible occasion. Choose some reasonable punishment for yourself in case you strongly believe you deserve one. It need not be so demanding. It need not be so tough. It can be so which can get some peace of mind for you for the moment. At least until the moment when you get yourself involved in something else, more cautiously this time. After all you better know what you have done and you know how it could have been different with you thinking better about it in the given moment. This realization must go in the next immediate task you do, whatever it might be and however easier it could be.
Choose punishments wisely, thoughtfully and rightly. There is no point in paining yourself too much, for the fact that there might come a chance to you to do and contribute your best next time. Believe in such opportunities. Wait for one and prefer to prove yourself to your innerself first. And hence try to reduce the tough feelings you have for yourself. It keeps you happy, motivated, energetic and confident.
You may just try it out and observe what happens!
PS: This post is written on a lighter note! Nothing in specific as such has probed me to say the above at this point of time. I thought the post number 999 at my blog shall be of my trademarks, what people say as 'thought provoking'.