My wife had gone through this when I was being tortured by my feelings for our ex. She was feeling the anger and suffering as if my emotions were hers. The downfall to this is the spiraling effect.
She was taking my emotions, trying to take ownership and then taking them out on our ex. This is VERY toxic. While I did need her supporting me, I did not, and would never want her to join me in my anger/jealousy/frustration. I ended up sitting down with her and explaining to her that I own my emotions, it is not her job to take those on. Support me, help me through it, but don't take them for yourself.
She and our ex are now best friends and supporting each other through their time together. I am very happy for them both. I still love E and will never stop but have to learn compersion...this series has been the toughest lesson of my emotional life, the first step though was taking ownership of my own emotions. It helped a lot for all of our well being.
Is there a word for it, no idea. Empathy maybe. I have actually been looking this up a bit since I found it interesting.