My 2c, stop looking for excuses, stop assigning your self worth to the quality of your work.
Mistakes happen, bugs are impossible to avoid. You may need to add rigid processes to your work to avoid the most egregious examples, but you just have to live with the fact that you will write bugs.
If you find you write more bugs than your peers and they have more impact than your peers, that's fine maybe you are not cut out to be a "systems engineer" maybe move to something more forgiving like frontend or something, you will probably be happier.
There is a reason that I am not working on avionics or respirator firmware. I don't have the discipline to follow the processes required to minimize the chance of accidentally killing people and I don't want the legal liability.
You don't have to be working on "important" stuff, John Carmack one of the best and most celebrated developer of our time spent most of his career working on games.
Be mercenary, do not take pride in your work, do your work for money. You will be happier, take pride in who you are and what you do outside of work.
> stop assigning your self worth to the quality of your work
my personal riff on that is 'stop assigning self worth to the quality that others assign to your work'. being able to internally generate self-worth through the act of producing high quality work is a super power.
I do agree that working for your career isn't the only options. Sometimes it's just to earn a living.
The things that both of them have in common is that they're sustainable. If you do not like your current position, make it sustainable for the time being. I was unable to do that, twice, so I think I'm at a point where I cannot do what I need to do.
Even the fun work (FOSS) is something I cannot sustain for 40 hrs a week, despite how much I enjoy it.
Time will tell, though