I would say I was in a similar position to you. I was never one of the smart kids in my class, always average, and then I failed my higher chemistry, twice, and struggled with higher English and Maths. So I wrote off medicine and went into music.
I then found out I was dyslexic, which explains the struggling as my subjects became more advanced. Anyway, long story short, I finally went for medicine at 32, and am just about finished first year. It has been a difiicult and challenging year, adjusting to being a student again, and being in a class of 160 highly intelligent people, who have all been top of the year at school, and have A*s all over the place! Our course we get told our class rankings from the first exam on, and I know several of the bright ones have struggled with not being in the top 10 (well someone has to be last!!). I am quite happy sitting averagely in the middle!
Your mindset has a lot to answer for, if you tell yourself you are not clever enough to be there, then you will end up believing that and failing. I came close to that, but my tutor pointed out that they rarely give places to people that arent capable, and the fact I got a place shows that I can do it.
So aside from my long meaningless waffling, if you want to do medicine, you have to truly believe you CAN do it, and if you get a place then you WILL do it.
I would also suggest trying to get a handle on the depression, both depression and low self esteem are not the best combination for commencing a challenging degree. So consider councilling, or speaking to your GP about your depression. Get some work experience to help you decide if the realities of medicine are actually for you. And then if it all adds up, apply for the foundation year. There is no point sticking in a degree that you hate. Will do you no good, and also will reflect in the classifcation at the end. (you have to consider this if you decide to look into graduate medicine)
Good luck! (I better get back to studying.. exams in 6 days...)
Px