Must be a painful situation to be so attached to someone you've never even spoken to.
It sounds like you're realizing that an electronic relationship isn't a real relationship, it won't satisfy your need for intimacy.
That's the key, you want more intimacy and he (for whatever reason) doesn't. You shouldn't see it as a rejection, he just can't offer what you want - and it sounds like he's being honest and forthright, you just don't want to accept what he is saying.
Forgive my candor, but I have to ask why you're pursuing someone so unavailable (both geographically and emotionally) and why you persist even though it's painful and he has made it clear it won't change? Be careful you are not caught in a rescuer fantasy which people in the helping professions are prone to...or replaying a scenario from your childhood hoping to change the outcome.
What about your med school classmates, or other programs (pharmacy, dental etc)? If you are not connecting well with anyone in your daily life, maybe it's worth exploring why not.
I don't mean to be harsh, I'm actually trying to help you because I can identify with your situation, as I have gotten into painful situations with unavailable men also, and it's caused me a lot of grief. I wish someone had pointed out the obvious to me, which was, "Why chase someone who doesn't really want you?" I think the answer for me at that time was too painful to accept.
You need to believe deep down that you are worthy of more than crumbs, and that your needs matter. You shouldn't just "keep quiet" for someone else's sake, what about your sake? You're hurting yourself, and sacrificing yourself. If he really is your friend, he doesn't want you to sacrifice yourself.
My advice is to look elsewhere for the intimacy and closeness that you're craving, they are normal human needs and you have a right to have them met. If there are things blocking you from doing that, then they are worth exploring.