The first thing that jumps out to me is loss. Maybe something happened in your childhood where you had experienced a trauma of loss that you may not necessarily remember but, the need to control it from happening or the feelings of it may result in this behaviour. would you consider councilling to help you understand what you are going through.
One thing i learnt which helped me was
each time a unhealthy thought would consume me i would think, is it real, NO. can i do anything if it did happen NO!,well why waste my thinking time on it. All that does is produce a very distressed me and then i would lock people out to prevent getting hurt.
it was huge when i learnt this concept, lifechanging. and mine came to childhood abandonment, rejection and loss.years of patterns had consumed my mind, a simple concept and i think differently now.its so much easier.all the best, life is a journey.