I think a lot of nice guys have trouble finding balance in some of these things. For instance, when he tries to detach, he feels he has to be cold. When he tries to have boundaries, it is more like controlling action instead of self-respect and/or protection.
You told her not to email you at work. When it was suggested how to respond when she did email.........you just did what your W said to do. Therefore, not following your own boundary (?) or the advice given. So, I see a nice guy who is struggling finding the middle, and he's jumping from one extreme to the other.
You can't control what she does. All you can do is control how you respond to what she does.
Don't give up. It takes time to find your way. You can do this!
It is not about what you feel should work in your M. It is about doing the work that gets the right results. Do what works!