The simple answer: a diet rich in swallowed pride. Being ok with not getting a final word. Giving up the need to win every argument.
There's pain, anger, and hurt feelings. The ultimate endgame was to have a loving, supportive ex instead of an angry and vindictive one. You have to keep your eye on that prize and sometimes absorb a few snide remarks or hold your tongue when you are given a good verbal volley.
When my kids were born, I understood up front that the first several months would SUCK. I mentally prepared for several months of exhaustion and frustration. When it actually happened, I was mentally prepared for it so it really didn't bother me that much.
Same as the split: I knew and prepared for the pain and anger, so it was easy for me to just let it go. Words said in anger are temporary. The reward comes sooner rather than later if I could absorb their impact and move on.