You are doing a phenomenal job allowing writing to be a form of catharsis. You'd be amazed at what you can learn about yourself from free writing.
I am no Psychologist by any means, but from what you've shared it sounds as though you didn't receive the love and support you needed as a child. Thus, it's natural to want to place those needs on other relationships that start to fulfill some of the deficits that you received as a child.
What tends to happen, though, is because we were never demonstrated healthy relationships and boundaries, we begin to mistake that "good feeling" for healing and come to depend on it to make us feel better about ourselves. To quote T. Swift--"Bandaids don't fix bullet holes." It's not healthy to rely on others to be our source of happiness.
The good news is that you already recognize this. I encourage you to keep writing. I've found some amazing books that have helped with teaching self-love, boundaries, and learning who "safe people" are. There are amazing resources on Youtube, Google, and of course there are therapists.
You've been through a lot and that says a ton about your fighting spirit. You got this!