Sometimes I feel the same way. I've resigned myself to not obtaining love or companionship after learning to overcome anxiety, learning social skills, learning to intuit people to a degree, and still failing constantly, so my skills are all I have to my name. That includes my education and my future career.
I can't say I'm envious of or hurt by the grades my classmates get, but my identity and self-esteem is all about my performance relative to them. Learning faster, being a more intuitive troubleshooter, remembering more, having niche skills they haven't been able to develop, etc. Those are the only pleasures I've ever been allowed outside of things like video games and food. I can be wounded easily if I feel I'm not even adequate competition, which happens around people who are naturally gifted.
The only thing that's helped is understanding that it's not as straightforward as the grades and trying to have the humility to develop.