i can relate, once i was the only person in my class to not get an A from P.E. at the end of the year, not even because i was objectively the worst at P.E., but because, apparently, i wasn't "enthusiastic enough" -- i was depressed and on the verge of tears almost every class, because my emotions were so fragile, i couldn't handle the least amount of criticism without spiraling -- so, trying to do sport, weak from all the days i could barely get up from my bed, let alone my room, and getting shouted at for not "trying enough" was awful for me, and only made me hate excercise.
is it possible you could maybe talk to someone at your school and try to get some accommodations for your mental health needs? or at least ask your teachers to not publicly disclose your grades?