well good for you for ending relationship. We all have a certain amount of emotional issues in life, I like to call it carry on baggage. A few minor things that do not greatly affect the health of your relationship. On the other side, some people have so many issues from childhood or elsewhere that cripple them in every aspect of their lives. this I call checked luggage. You cant bring that much emotional baggage into a relationship.
The second thing about you, not to do with a girlfriend, some people suffer more trauma in their childhood more than others. It's tragic but children many times come out on top or alternately are doomed to repeat behaviour they learned as children. Or allow it to cripple them in adult life. I say allow because a child has no means to fix these issues but as an adult who is AWARE of your behaviour and your depression and AWARE it is affecting your life, you are CAPABLE and responsible for going to get help. There are resourcese EVERYWHERE, counselors, professionals of ALL KINDS. There is absolutely ZERO excuse for you to wake up every morning and CHOOSE to allow these childhood issues to cripple your every day. You make a choice. The first time is a mistake, after that is a personal choice. And you have yourself only to hold responsible. You cant blame your childhood your entire life for negative or toxic behaviour in your adult life. How that ends is people taking out their anger on loved ones and no one deserves that. get help. NOW.