I had an EA that I managed to pull myself out of, for the same reasons you state, but then massive doubt over whether I'd done the right thing. Desperately missing my AP, thinking about them all the time. Distress over what I might have lost.
For myself, I took the scientific view. I couldn't understand why I had behaved so badly. A "nice guy" becomes a secretive, lying git. All of a sudden in my head my marriage was terrible, my DW awful. I didn't know what I wanted. Really?? Thanks to MN (and I owe MN so much), I now know I was reading the script. Or rather, was writing the script.
For me, the explanations around limerence, around dopamine, it all made sense. It gave me a framework with which to sort myself out.
So, you accept that your thinking right now seems clouded, dysfunctional. That's a good start, because it really is. In the grip or limerence you will say and do truly awful things, take stupid risks, hurt those you love.
I tried many things to deal with it. The frustration is that you know deep down what is right, but feelings and emotions and intrusive thoughts play havoc with your mind, and feel outside your control.
Three things eventually got me out of all this. Firstly, no contact. Accept your AP has moved on. They are gone and it's for the best. The grass is not greener, in fact its definitely worse.
Secondly, time. For a while I measured my feelings, trying to work out if I was getting better. I rated my limerence out of ten each day, looking for patterns, trends. I know this is extreme, but like I said, I went for science. I realised I was getting better. It gave me hope. How long? Months. Maybe a year to be one out of ten. There's probably an interesting graph in there somewhere.
Thirdly, talking/reading/therapy. Find someone you can talk it through with. I wish I'd spoken to someone but felt like I had no one to talk to. It was MN that helped me, so much. Reading about the distress this behaviour causes other people, and how pathetic I had been really woke me up.
Good luck OP.