I understand your predicament.
Relationships undoubtedly enrich the quality of our lives. To love and be loved is indeed one of the most rewarding experiences that life offers. Nevertheless, it is primarily essential to ensure one's psychological and physical well being just like how a strong foundation is that component of a building that is built first.
Once you are truly secure within, friendships and healthy relationships are a natural consequence as you engage with the world.
Here are a few suggestions that could help you :
Awareness of how the mind works and how thoughts are generated will help you overcome the challenges you are facing right now.
The nature of the Mind, which in simple terms we experience as thoughts, is such that, it will keep shifting its focus from one object/topic/event to another. Ii always needs something to hold on to.
Today the mind might be fixated on something. Tomorrow it could be another topic/event/person.
Another important characteristic of the Mind is this - You may either have thoughts about the past or the future. This keeps alternating. Try thinking about the present moment - you will see that the Mind and 'Now' can never coexist.
The Mind has 3 states in general. Sometimes, you may find yourself having very positive, inspiring thoughts. During other times, you may find yourself very emotional, or all charged for action. Whereas during other times, you may feel very lethargic, dull or lazy. These states keep alternating.
Having understood the nature of the mind, the first step towards mental health is to become aware of your thoughts. Learning to be an observer of your thoughts, learning to observe them from a distance like clouds passing in the sky. Just like how the clothes you are wearing right now are yours, but not you, thoughts that you experience from time to time are yours, but not you.
The next step is knowing that you have the power to choose which thought you wish to focus on and act on and exercising that power. With practice, you will have better mastery over this process.
Having negative thoughts is something that plagues everybody from time to time. Trust me, even if everything was perfect, we may still find shortcomings somewhere and brood about it.
When you repeatedly focus on a thought ( that springs from a belief that you have and which is threatening or disturbing by nature ) the corresponding emotion rises in your brain. It overpowers your capability to think rationally. The cycle repeats and you feel imprisoned by your own thoughts and emotions.
As mentioned above, with practice, you will learn to focus and entertain only those thoughts are healthy enough to be acted upon.
Usually when we experience disturbing thoughts, we may tend to fight, resist or control them. But fighting a thought is like fighting a shadow. You can see it, but it's not real. Fighting a thought or emotion only gives it more power. Say for instance, when someone asks you not to think of a pink elephant, the first thought that invariably comes to you is that of a pink elephant. Instead, what we can do is, learning to be a distant observer of thoughts ( that are only based on past experiences and hence are no longer true or relevant today or do not serve your highest good ) and not act on them.
Whenever you feel overwhelmed by thoughts, just bring your focus back to your breath and take a few relaxing breaths.
Here is a breathing exercise that could help you :
You may do this in the night too once you have finished with your tasks for the day :
Inhale slowly to a count of four - hold your breath to a count of four - exhale slowly to a count of eight. Repeat this ten times. You may do this also in the morning before you begin your daily routine.
Gently massage the back of your neck and the base of the skull when you lie down to rest.
Whatever you feed your mind through your sense organs will be replayed to you as thoughts. Be conscious of this. Take care of the content you feed your mind - the kind of books you read, the websites you visit, the kind of music you listen to, the kind of food you eat, the kind of company you keep ( "You are an average of five people you spend most of your time with" )
Our attitude towards life in general and things in particular is based on our Beliefs - what we believe to be true about ourselves and the world.
What are your core beliefs about yourself and the world?
Try writing them down and examine the validity of these beliefs.
Some of them may be limiting and negative in nature because of the kind of feedback you received while growing up - at home, in school, from your classmates, friends, relatives, etc. But once you are aware of them, you shed light on them,examine their truth, they can no longer manipulate your behavior or actions. As your beliefs change, your attitude changes, and words, actions and behavior follow.
Please set aside time for exercise daily and make sure you eat healthy every time.
Our challenges that seem to threaten our very existence are the ones that serve as fuel for our evolution.
Here are a few links that could be helpful :
https://fit.practo.com/#!/content/41615
https://fit.practo.com/#!/content/41716
https://fit.practo.com/#!/content/41867
https://fit.practo.com/#!/content/41735
https://fit.practo.com/#!/content/41642
https://fit.practo.com/#!/content/41639 Step One
https://fit.practo.com/#!/content/41640 Step Two
https://fit.practo.com/#!/content/41641 Step Three
https://fit.practo.com/#!/content/41645 Step Four
Take care.