There are so many issues here in the OP. Addressing them is (somewhat) complicated and not given to simple, platitudinous solutions:
1) You are lonely because some core part (not recognized by your ego: Freud-style ego) prefers to isolate. It could be fear of rejection, it could be an innate shyness, it could be low self-esteem. I'm not a psychologist, and since we've never met I have no idea which one of these (obvious and incomplete) answers suits you best, if any. But they're at least a very simple outline for further reflection;
2) Physical intimacy does not automatically equate with emotional intimacy; it's a rare FB (at least for me) who'll at least spend the night. Most are more interested in a Chew-&-Screw arrangement, if you'll pardon the expression. Hook-ups and FBs don't usually allow for such "relationship commitments) as wake-up snuggles, though they do occasionally happen;
3) Falling hard for impossible types is sorta my MO. It's a way of distancing yourself/intimacy avoidance that's one of my less-attractive attributes. I justify it right now by disclaiming any interest in a deeper rapport with my sundry sex partners. But deep down even I recognize both the self-doubting part about what (beyond crazy sex) I bring to the table and a deep-seated inner voice that I have very little to offer otherwise. This, again, is hardly a positive quality; I can recognize it as such, deplore it yet allow it to continue.
FWIW, this is hardly a new thing for me. It's a hardening of an elementary self-image I've been hauling around for 30 years (or more) now. I'm self-aware enough to understand that it's a form of self abuse/denial of happiness. It stems from considering myself as fundamentally broken (which I know I'm not in the rational side of my brain); yet emotions are the antithesis of rational thoughts and behavior, so I (cautiously) embrace it even as I struggle to eradicate it.
The simple answer is to seek unlikely specimens and avail yourself of the deeper emotional connection that s/he may wish to provide. My own experiments at such outreaches have been a very mixed bag: I love the bad boys and have no one but myself when they wind up being bad for me, my goals and the stability I really do crave (protests to the contrary).
You're better than whatever mechanism has taught you to reject calm emotional stability instead of a wild ride on thee emotional roller-coaster; we both are. yet it continues.
But after 30+ years of such behavior, even I recognize that it's self-denial of the positive in favor of a rather embrace of the negative and self-debasing all too common in too many psyches. If and when you find your way out of the house of mirrors, please let us know how you did it: I'm not the only one interested in finding the path out of that especially loathsome labyrinth.
Good luck-
UBb