I just wanted to say that Im in a similar situation, but here's how I'm approaching med school. It's a complete attitude shift. I decided it's no longer a competition (even though med school curriculums out there undeniably make it so), but it's about me and my personal growth into a competent physician. We are first years. It's too damn early to worry about residencies, seriously. This is our time to learn the material that will make us doctors for the future.
We're no longer trying to get into the best undergrad school and then med school. We should no longer be feigning interest in things to boost our resume (to an extent, y'all know what i mean). Our grades are OUR GRADES. Our grades are not our peers' business, their grades are not our business. You do badly on one test, you find out what you did wrong, and relearn that material. Do some more practice questions from that material so you know it. In the end, it won't be your test scores, but what you know.
I firmly believe that if you worry too much about grades, you'll miss out on the big picture. Come on, think back to when you were a freshman in high school or college. First semester. Remember how much you worried about test scores and grades then? Seems silly now, doesn't it?
So dont fret. These next two years are about YOUR EDUCATION. You're now in medical school, beginning the process of learning the trade you will be doing for the rest of your life. You shouldn't be worrying about something three years down the road. It is your responsibility to know what you need to know right now. Worry about that and only that. Don't learn it cause it'll get you a residency. Learn it cause it's med school and that's what you need to learn right now.
I think if you do that, everything else will just fall into place.