Once I was told that I deserved to be fired and, another time, I was told that I am unable to think properly so I shouldn't work as a software developer.
Both remarks were quite painful because they were not questioning my ideas/opinions but my professional abilities. I confess that in my "down" moments those thoughts tend to pop up even years later.
I just had someone say I should not be using a steambox because I feel swapping the ssd was not super easy? If you don't know what a steambox is, it is a piece of consumer electronics (just fyi just in case). The fact someone thinks they can comment on your abilities to work your job based on one thing indicates they are likely not qualified to give that advice.
I think it has less to do with the comment and more to do with how hard you are on yourself. Here's a, not so secret, secret; a lot of successful people suffer from imposter syndrome. I know you probably know all this already but i am here to attest, I suck too at times, but that doesn't mean I'm a sucky person.