I think physical (not just for relationship-relationships, friendships, like sitting near, hugs when you need them, touching somebody's arm frequently, pat on the back...) and emotional closeness is important for relationships (friendship, relationships, parent..-ships) to really seem comforting/ as if they exist. Physical closeness gives memory to a relationship, you can remember the feel of a person. Also, complete and utter honesty, which would also be about how you feel.. what you're thinking at the time.. Being honest about depressive thoughts even when others are partying/happy.. etcetc. Leading to feeling as if you can trust them, /to be there for you. Being honest, even about the negative, is very important because then you and your friends can show their weaknesses. Without that side of a person, you're missing a half of them, and it buries the opportunity to be their for one another in times of need.
Also, it is important to feel as if you belong, foster similar interests or attitudes so that you can relate to others.
If you have learned that all relationships are temporary because you will be left eventually, you may be fostering a "I am just passing through" type of mentality that keeps you feeling on the outside.
Lastly, if you are able to develop a physically and emotionally close and honest relationship with a friend/partner/whoever, and you still do not feel worth it, then more likely it is you and your confidence that is keeping you lonely because of it's absence, not other people. Perhaps you are expecting to be completed by people, and when it does not happen you feel alone in your incompletion, this could tie into feeling as if you do not belong, the feeling of incompletion. Well, that one was a complete shot in the dark. I'm pretty much just speaking from my own experience here........
I am exactly the same. And it is truly killing me, emotionally, internally. It's a hard one... hang in there, I'm sure true love and company can and does exist. Somewhere..