Hey stupid (what a name, really? Is that what you want to think of yourself each time you log in?), you're in a good place if you are honest about doing the work.
It looks like you've been using two women for the gratification of your wants. The wife to take care of your day to day, the AP to fulfil your sex drive. The kindest thing you can do for either of these women is to go NC with both. Move out, find your own place, and leave the AP and BW alone.
You want her back? What about your BW? Does she want you back? This is the first thing us waywards need to work on- the selfishness and entitlement. The idea that, because you're ready to turnaround and make some changes, start doing work on yourselves, that you're automatically entitled to reconciliation.
You're not entitled to reconcile.
With an ongoing A for 6 years, you fall into the long term A category. This means you have stolen many years from your BW, probably her best years of her life, and you have nothing to offer her in recompense for her wasted time. It's a hard pill to swallow.
It's not a popular opinion on this board, but you've also wasted your AP's time as well. Cutting off the A, being transparent with OBS (if there is one) allows the AP the chance to come clean in their life and really start getting THEIR shit together. Honesty about the A to all involved parties is the only way to kill the cancer. AP may have known about your M (likely she did with it going on for 6 years), but she too deserves the chance to change. Even if it was forced on her. You wasted her time and her spouse's time and enabled a cancer in their marriage too. If she was married, her OBS was living a lie and in danger of being exposed to disease. This needs to be dealt with too- AFTER you deal with your BW.
Have you asked your wife what she needs to start healing? Has she made a list? Have you done it?
To better help you out on the board, usually we ask the waywards for the basic info so we get the scope:
-How long dating, how long married,
-How many OW, how long in various A's, were they emotional/physical/both, were OBS's notified?
-How many kids, how old and whether they are at home or not,
-Job situation- are you and her employed, how do you both make ends meet?
There's a lot of good help on this board and a lot of experienced WS and BS who can point you in the right direction.