I used to do this too. I did some cognitive therapy on myself. I'm surprised that worked actually, so don't hesitate to seek a therapist to help. I think it's an example of one of those unproductive Ti or Fi internal loops where things are evaluated without objective external evidence.
Automatic Negative Thoughts (ANTs) are negative assumptions/evaluations of social situations and interactions. Think of them as automatic logical social fallacies. Once you learn to recognize them, the challenge is to make a habit of challenging them when they occur.
For example, if I made a new friend, and they suddenly didn't want to talk with me or spend time with me as much, I would think that they thought I was weird once they got to know me better, or maybe that I said something which they were offended by or weirded-out by. Instead of thinking that, I replaced those thoughts with more realistic ones, such as: Maybe they didn't like me is a possibility, but it's equally likely that they just got busy, were worn out from social interactions in general, got over the excitement of making a new friend, maybe they're dealing with a tough family or work situation, or maybe they're having ANTs about our friendship themselves and we're both sabotaging the friendship unknowingly! Sometimes I would communicate with them to find out what the situation actually was, or other times I would just blow it off, maintain a present but comfortable distance from them, and wait for them to re-initiate interactions once whatever the external situation hindering our friendship had resolved itself.
To summarize intuitively: Perception is not reality, but it is your reality. The amazing thing about that is that you can change your reality by changing your perception.
Here's some useful info on ANTs and how to get rid of them:
http://www.thehappinessinstitute.com/freeproducts/docs/Examples Of Unhelpful Thinking.pdf
http://www.thehappinessinstitute.com/freeproducts/docs/Managing Unhelpful Thinking.pdf