Still:
Eric has some good advice; listen carefully. Stillness is so important; we learn so much when we just stop. Many people don't want to stop--they fill their lives with activities, noise, work, people, etc. but in the process they are cut off from themselves. Go inward. M Go Blue had a wonderful post several years back about how this inward journey will be the most beautiful thing we ever experience, provided we have the courage to go there. It's easier not to go there, but life is better if you do. It's a long process. I'm still on it, more than three years after my marriage blew up, and I will be on it the rest of my life. But I am happy to be where I am. I never would have imagined that when things fell apart.

Detach, detach, detach. One moment at a time. You will backslide with her, with yourself. Forgive and get back on the horse and do it again. It will get easier but you have to stick with it.

Try letting go of judgment, as it applies to yourself and her. Her actions may make you mad, but as Snodderly and others have said, behind the texting, etc. is a whole lot of pain inside of her. It may be hard to see, but it's there. That's her work to address, not yours.

Your work is something different. I think M. Go Blue had it right when he said that what is critical is to see what happens in our lives as learning opportunities. What is it you need to learn from this experience? Until you figure that out, you will keep spinning in circles filled with anger, frustration, and sadness. Let that go and figure out what you need to learn. We are bigger than our roles as spouses, parents, workers, etc. Inside each of us there is a core. Move toward that core and the other stuff shrinks in importance. It's not narcissim. Rather, it's an essential journey to wholeness. You will be better for yourself, your kids, and anyone else in your life if you have a deeper sense of yourself.

Look out for yourself financially. That is essential. A few months/or a couple of years and a life's effort can be wiped out. Try to keep that from happening; do what you need to do. Be firm.

Take care; we're pulling for you.