It's normal to feel bummed out! Everyone in medical school is used to being an ultra high achiever, so when you put a bunch of ultra high achievers together, inevitably they'll separate themselves. You're doing around average in a group of some of the best students in the country - that's something to be proud of! Medical school requires a mental paradigm shift not just in terms of what to study and how to study, but also how to frame your own progress. Comparing yourself to other people like this isn't really a productive endeavor.I just found out my class rank after my first semester of medical school. I was pretty bummed because I had thought that I was doing well for just getting here and adjusting. I ended up with 3 As and 4 Bs. I was ranked 66/100 in my class. I definitely think it will get a little better but I am feeling very discouraged because I really always studied and did my best. Please give me some inspiration and advice to keep going and feeling confident!
In terms of professional development, your class rank will really only factor into AOA (and sometimes for preclinical, it doesn't or only does so minimally). Your preclinical grades and ranking really don't matter that much when it comes to residency. Your board scores, research, letters, and clinical grades will be much more important. So for now, focus on doing the best you can and learning the material as well as possible so that when the stuff that really matters comes around, you'll be ready. And also don't forget to have some fun too!
Best of luck, and chin up, you're doing just fine.