I have trouble loving others too (but when I do learn to love someone, I get hooked real hard).
I recently realized that I look at the world as though I am looking through a curtain. I can see out, and others can see in if they look hard enough. I always have my curtain in place. If someone gets too close, I can step back so they cannot "see" me. I decide if I want them to have a closer look. I guess it is a vulnerability issue.
Have you tried therapy? It may help you have better relationships in many areas of life.