I am sorry you are having to deal with this....
honestly i always wondered who does this in real life although ending up with a friend seems to be story lines from TV/ movies...... My BF knows all my spouses flaws doubt she would give him time of day and visa versa.....
Neither one was truly a friend to you as that does not just happen..... sounds like you were blindsided but did you not have clues the marriage was struggling...?
I think the longer people are together the harder it is to accept it is OVER...... i have recently spoke to some older couples it was a surprise that i found many were on spouse 2 or 3 ...... even after long term first marriages ....
people change and too many deny things are headed down a path of no return...
being aware it is running on empty tank fumes is miserable...... but not sure if that is better then being in your shoes.