Welcome to the community here and thanks for sharing your story with us. I am sure there are many people from all age groups who can relate to what you have written, feeling like you are not good enough...despite how much you achieve and manage to do.
There is a thread on the forum that is called something like " Dealing with the inner critic" by Quirkywords. See if you can find that. (My memory is not always fantastic so don't recall the actual title. Sorry!)
Is there a teacher or counsellor at school you can talk to regarding your grades and how you may be able to improve. There may be students who mentor in different subjects as well who could help.
Comparing ourselves to others is a natural thing to do but it is not always helpful. If you can use a comparison in such a way that you see something in another person that may benefit you and you can use that talent or ability, that is wonderful. Criticising yourself for not being like someone else is not helpful.
We are all individual. All you can do is your best!
At the end of each day think of things you have managed to achieve in the day, it doesn't have to be huge. Also think of 3 things you can be thankful for.
I know from experience that it is not possible to be happy all of the time and that is okay. Life has its ups and downs. I have recently been in a horrible place mentally. Now I feel I am slowly working my way out of the pit. It takes effort, desire and patience.
Like that saying of taking one step forward and two steps back. As long as you don't give up you are doing really well.
Please know you are welcome to continue to share here as often as you need or desire.
Wishing you all the best, cheers from Dools