One of my mentors when I was kinda taking things harsh like it appears you are, said to me “There’s two kinds of experiences in life. Winning experiences and Learning experiences”. So I said to him, “what about when I feel like I’m just not good enough”, to which he said, “Well, that would be a losing experience”.
Take the lessons wherever they come.
And if it were me, I wouldn’t let my head beat me up over this, I’d just ask boss man if I was meeting or exceeding his expectations or coming up short.