So, to answer your question, you detach TO WORK ON the M. Detachment and working on the M are not opposing forces. You can detach (which is really about getting your mind right) and work on your M at the same time.
Hopefully I can articulate this well - but I'm developing the view that what I need to do is provide for my own emotional needs, instead of my marriage or my wife doing that. It's my goal to be OK, regardless, and if my M survives, I can bring that energy to it, instead of taking it from it. Seems that detachment is a response to building your own strength, vs. withdrawing.