Welcome to SI and I'm sorry you're joining us. There are some posts at the top of the forum that we encourage newbies to read. The Healing Library is another great reference and includes the list of acronyms we use. Please be sure to read the Before You Say Reconcile - Recover. R (reconciliation) is a gift you can give your spouse, but you need some time to recover before deciding.
Your WW (wayward wife) should get a copy of How to Help Your Spouse Heal From Your Affair by Linda MacDonald. It's a nice blueprint for her to start with, as there are some good nuggets in there. She also needs IC (Individual Counseling) to start working on her whys and to become a safe partner. At this point, watch her actions and don't pay attention to her words. You've already figured out that she's a liar. If she has been in IC, then she's probably lied to her IC or she needs a different IC.
For you, IC with a betrayal trauma specialist can be helpful. Also, if you struggle with depression, anxiety, sleep or whatever, ask your doctor for meds. If you're certain they weren't physically together, then you probably won't need testing for STDs.
After you've both healed, then you can do MC (marriage counseling). Your M didn't cheat - your WW did. MC or CC (couples counseling) is to work on the relationship and has a tendency to shift part of the blame to you, the BS (betrayed spouse). The A was 100% your WW's decision and not something you did or didn't do, said or didn't say. She unilaterally made thousands of conscious decisions to cheat on you.
It takes about 2-5 years to heal from infidelity, so think of this as a marathon and not a sprint. Things aren't going to get better and trust will take a long time to be restored. The M (marriage) you had is dead - your WW blew it apart. If she does the work to figure out her whys and to become a safe partner, then you may choose to offer the gift of R. R is a lot of hard work, and both partners need to be in it 100%.
At a minimum, she needs to go NC (no contact) with the AP (Affair Partner). Total transparency with electronics until trust is restored. Is AP a coworker? If so, then she needs to find another job. What has been the experience here is that if they work together, the A (affair) will continue. There are a few SIers (very few) where the WS (wayward spouse) and the AP work together but thousands of miles away. But that didn't stop others from continuing.
For me, if they participated in mutual masturbation, that is physical in my opinion. The only thing they didn't do was touch each other but they did that themselves. (Other opinions may differ.)
She says she wanted to end the affair, but did not know how.
Well, the best answer is to protect your M so that you don't get in that spot in the first place. She did know how - she could have said, I'm not doing this any more, No, Stop, or even not gotten on the phone or app that they were using.
Not Just Friends by Dr. Shirley Glass is another excellent resource. One of the chapters that I like is Windows and Walls. It discusses boundaries. The windows are what you establish between the two of you, and it represents transparency. Walls are boundaries and are set up between everybody else who is not in your M.