To detach, just....let....go. The focus is on you. You need to eliminate the "connection" that you have with your feelings and your W. What I mean by that is you let her affect you too much. You need to have a healthy distance from her emotionally because you've given her the ability to affect you this way.
I don't think there are "tools" to use here. I think this might plug in with your co-dependancy AND your self-doubting. You are not allowing yourself, through those two things, to detach. You're looking for us to answer for you what you can do. I honestly think only YOU know the answer, though.
YOU have to set the boundaries. YOU have to take back the ability to affect your emotions. Don't let anyone, especially your W control YOUR emotions.
Easier said than done coming from me
Me: 30 W: 27 Married: 9/2007 ILUBNILWU: 1/2008 W moved out 5/24/2008 W suicide 8/25/2009