The first step is to admit you have a problem....(insert sarasm smiley here).
Seriously, I was the Queen and ruler of Co-dependcy Land when my H had his A. There is a lot one can do to overcome that, and there are s few really good books out there, one I found helpful was CO-dependent no more.
The most useful thing I did to "cure" my codependent ways was to make sure I was putting myself first in how I lived. It took time, and a lot of error, and trial during that time.
This is about discovering and appreciating your own self worth. Once you get that you are worthy, strong, and capable, then you can see that by putting yourself first, actually will make you a better person, spouse, friend, and mother.
The quickest way to realize you may have a codependency issue is when you fly they say if the oxygen mask is deployed, apply yours first then assist your child or others around you.....A codependent person would say I have to do my kids first, I have to know they are ok.
NOPE - You have to take care of you before you can care for your kids properly. If you put the kids on, and your brain is starved for oxygen, then you may not get it on right, and not realize that, or that you fail to make good choices.
Same in many other aspects of life. If I put my H's wants, and needs before mine in everything, and count on his approval, and compliments, then I loose the ability to do this on my own. I was horribly unhappy, and had been convinced I was a bad wife, bad mom, crappy housekeeper, horrible driver, poor petkeeper, and the list could go on and on and on. I was doing everything to make him happy, and in turn nothing for myself. He was displacing his own self hatred for being in the A to me, and blaming me for everything that ever was going wrong in life.
After Dday, (and not right away) I realized it didn't matter if I kept my house perfect, or always had a well balanced meal on the table, or parented with an iron fist. What I realized that if I wasted all my energy on him then I was lost. There was no me anymore. So I focused on me.
I started getting my hair cut and colored professionally, I started getting manicures, and pedicures. I took time away from the family to exercise, and get stronger. I quit putting everyones laundry away. If I wanted to stay up and read I did. I started to find me again. I got very interested in a new hobby, which has become a family hobby, and now a thriving small business.
My H knows I don't put him first, and any of my attentions I give him are intentional, and are of my WANT to make him happy, not my need to seek his approval.
I think some of this comes naturally as you heal from an A, some of it comes from maturing. I was in my 30's when Dday happened and was still caught up in what the rest of the world thought of me. Now I'm in my 40's, and can honestly say I don't give a crap what the world thinks. Old enough to be happy being me. Being smart enough to realize I don't care what anyone else thinks, because I know I am pretty neat. I am happy with myself, and validation comes from within.
It takes time, but you can get there.