I understand how one's self esteem can be impacted by how well you do academically, so it's not stupid - it's just not the healthiest thing to do.

I'm astonished that you can have that grade percentage after failing two tests! That's amazing, really.
Have you talked to a school counsellor about this at all? It sounds like it's something that you need to be able to work through. And don't abandon hopes of attending college, because I think you'd be awesome at it!