Often people become codependent when they had a parent they had to care for all their lives, or they were never allowed to take care of themselves without being made to feel guilty about it.
So how do you take on independence? Start taking care of yourself. It's that simple. Blast away that shame about spending time on yourself. You can't take care of your family if you aren't healthy both mentally and physically. Your family will be so much more appreciative of you if you have your "head screwed on right" so you can see what are the real issues in your family. They may complain in the short-term, but long-term they will be glad you did some self-care and gained independence. You are setting a good example for your kids of caring for self. And by becoming independent, you will be helping them ultimately see independence modeled.
You may have some tunnel vision right now because you can't imagine how you could possibly pull away from the current problem without abandoning everybody and being a bad person. Truth is the other people are probably hoping you will step back and get a bigger picture so your anxiety and theirs can go down.
On the other hand, if you are in a relationship where you are trying to pull back and take care of yourself but you keep getting shamed, then tell the other person(s) that you are developmentally reaching a new stage where you want to establish independence. They can accept that or not, but you must take time to care for yourself. That doesn't mean spend tons of money on yourself, just do something you want to do. Go to Hawaii for a couple weeks! or just take a warm bath in the morning after getting the kids off to school.