Being good in classes and being good in exams are two very different things. People who show their smarts in class may not be so good at exams or coursework. It's not like you've been lying to everyone - as a teacher, I can tell you it is easy to tell apart hard-working, intelligent students from those who aren't.
I was in a very similar situation when I was at school, particularly in sixth form. All my teachers thought I was clever and hard-working, but due to problems at home and a struggle with depression, I started failing classes and dropped out after my AS Levels. I felt like you - that I'd let everyone down - but looking back I know that wasn't the case. Grades and qualifications aren't the be all and end all. Yes, I didn't achieve what I wanted to, but I made it through my problems and I moved on, and although it wasn't along the path I thought it would be, I'm in a much better place now.
The point I'm trying to make is that passing or failing exams won't make or ruin your life. Maybe the subjects you chose or the exam style is not for you. I went to (and dropped out of) 4 colleges before I realised what I wanted to do, and I don't regret it. Trying to figure out what you want to do when you are struggling with emotional problems is incredibly hard, so it's not surprising to find it difficult. Focus on yourself and what you want to do, rather than worrying about other people. It may sound selfish, but it's your life and you can do what you want with it. There's more ways to be successful than just passing exams.