Hi OP.
I am sorry to read of your situation. It must really hurt. Through no fault of your own, you are not fitting in either side, and your parents aren't helping are they.
I have a similar story, but I did the estranging myself.
Divorced parents, messy and lots of arguing. We were young. Mother moved us a long way away and while dad paid for everything, we barely saw him. Mother was depressed and abused us all.
My sister and I are now in our 50s. In order for me to heal, I got stuck into therapy and self help books and finally got some language for it all.
My dad used to say, 'if I could do my time again kid, I wouldn't have children this time, no way.'
That led me to understand that he didn't love us and didn't really want to bother. I cut him off when I was about 30 I think, I'm now 51. During that time, I just got stronger. You ask how you can avoid MH problems, well, don't bury it. Let it out into the light of day, like a festering wound that needs fresh air to heal. The years WILL heal it, if you talk about it and cry and 'feel it.'
I can tell you now that my dad is 84 and we have been back in touch for about five years, over text. I don't bother much because he doesn't really like to text. He will never ask about myself or my family, only text about himself, one word answers and frequently a bit rude.
But the difference? It no longer hurts me. Because I felt the pain of that being true many years ago, I have been through it so many times and come to terms with it.
So my answer to you is just that - come to terms with it, with the whole loss and truth of it, such that you can talk about it without crying. And bolster your own life, your close relationships. You can live without a family, you can make your own, and you can have really close friends. Not everyone gets a family. Yes it is hurtful but you can manage without. And you will get to a point where it doesn't hurt anymore.