I would suggest that you stop talking with MIL about your marriage from here and on. These types of talks really can muddy waters and make W feel ashamed.
Look past the OM and never bring up his name to W.
When W texted you this:
"Have fun in your life. I hope it's great. My mom loves you and hates me so that's great. I just got an ultimatum. So now I'm out of the house. I'm done. I have NOTHING TO MY FUC%ING NAME. Take care. "
Have you responded back to her yet? If not, then I'd suggest that you use this script:
It seems that you're are feeling overwhelmed right now and feeling pressure from your Mom. I am sure you can figure this out. Take care of yourself.