That's hard, I'm sorry you have that struggle. I am about as far away from an expert on the brain as it gets, so I don't want to pretend to have wisdom there. The only thing I can say for myself is around Duḥkha, or that life is suffering.
Navigating the balance between self improvement, and being okay with the idea you may never improve to the point you want is hard. I know as much as I wish I could run a 5 minute mile, I was incredibly sedentary in my teens and 20's. It bothers me that I may never become "elite" in fitness because of my past, and that's just a fundamental barrier for me now.
My current thought is trying to find my personal worth in the journey of attempting self improvement, and not having an absolute goal of "I must be this smart" or "I must be this fit" to consider myself valuable. That mindset is easier said than done, though.