High grades do not necessarily indicate that you are the smartest person in the class. I see many brilliant people in my classes who are undisciplined. Some of which I am sure are probably smarter than I am, but I generally score higher. That saddens me because I know the importance of learning.
However, what strikes me more is that your self-esteem is wrapped up in your grades. You probably have grade anxiety because without those As you feel less intelligent. You should do your best to let that go and just enjoy learning for what it is because grade anxiety will make you very sick. I am sure your talents extend beyond academics. Don't forget to cultivate those talents too!