I can tell you how it doesn't matter all that much, since you at least got into a mid tier US MD school. I go to one, and one of our graduates recently matched into Harvard's Derm program. But I doubt I'll be able to convince you that your school prestige really not as big of a deal as you're making it out to be. In your mind, you feel inadequate because you feel you are going to an inadequate institution relative to your self-perceived talents. Two things:
1. Kill STEP1, do well clinical years, get some great LORs, and do some good research in an area you love. That way, you can get into a prestigious residency. Since you clearly value prestige, it'll make you feel better about all of this. Think about what you can do to obtain prestige in the future. Part of that might honestly be not doing things in a rush, as you admit you did with med school applications. Try to learn from your mistake rather than wallow in self pity about not receiving what you think were entitled to. Trust me, that's easier said than done. It's super hard to consistently do because regret is the epitome of mental masturbation without orgasm. Even though it's addicting, it sadly doesn't even have a pleasurable end. In my limited life experience, those who don't let small hurdles get to them mentally tend to do a lot better than those who obsesses over every small perceived mishap.
2. This one is harder. But stop valuing the prestige of your school so much. Even if you do value it, don't make your self worth so dependent on it. Your self worth is like an economy. Generally speaking, it's good to have a diversified economy. That way, if one part isn't quite where you want it to be, you have other areas to fall back on, at least temporarily. Currently, you are like an oil rich OPEC state. The price of oil has dipped a bit globally, but your country is hit super hard because it is so dependent on the price of that one commodity. Now, if you had a diversified economy, like say Norway, yeah the dip in oil prices might hurt you but not nearly as much. The point of this analogy is to encourage you to find other things you are good at and value, whether it be a hobby you love or really close friends you have. Find a good 4-5 things. If you had those, this type of stuff wouldn't bother you.
I'm speaking from a place of experience. In high school, I did really well on standardized tests. My grades were really good and my ECs, though not unique, were still fairly impressive. I did manage to get into a single Top 20 USWNR school, but I didn't crack into a lot of top ivies and their equivalents, unlike many of my close friends. I felt awful. Looking back, I believe I felt that way because I had connected too much of my self worth and identity to my success as a student. I not only made the error of valuing my success as a student based off the prestige of the institution I attended but also the error of not having a multifaceted identity. Over the last half decade or so, I took a lot of the advice that I just gave you. I'm a lot happier. Good Luck! You'll do great. Just remember to concentrate all of this energy to propel yourself in a more positive direction.