Codependency Support Group
Codependency is defined as someone who exhibits too much, and often inappropriate, caring for another person's struggles. A codependent person may try to change, or feel shame about their most private thoughts and feelings if they conflict with the other person's struggles. If you are on a journey towards self-love, this support group is for you. Join us and find others...
A 12 step recovery group like coda or alanon can help with codependency. Cognitive therapy can be useful. Just know that you're not alone in having problems with the ego.
I think that may help you begin figure out why you started behaving in this manner. It goes more in to depth about the kind of concept HealingGrace mentioned, only it uses an iceburg for its representation of how childhood issues get buried beneath the ego and stored in the id (i.e. subconscience) until they surface in behaviors closer to the ego such as addiction and codependency.