Has anyone at work raised any issues with the quality of your work? Do you have any real evidence that your job is under threat because of the quality of your work?
If neither is the case, then it is likely that you are just being too hyperaware of any mistake you make and the consequent anxiety is undermining your self confidence. It's definitely not a good frame of mind to have because, as you say yourself, you are acutely affected each time you make what you consider to be an error.
Clearly, you are a bit stuck in this mindset - but it is possible to get out of it.
First, as you already have acknowledged, truly accept that we all make mistakes, no one, not one single person in the world can avoid making mistakes.
Second, that mistakes come in many shapes and sizes. Some are miniscule, some are major. Are you lumping all mistakes, big and small, together? Can you start by learning to let go of the small, less significant ones?
Third, keep a notebook with any "errors" made - make a note to self of how you would deal with the same task if you encoutered it again - then close the notebook. Revisit these notes at a future date to reflect upon them. It's amazing how quickly some problems fizzle out quite quickly.