When someone treats us badly, it's my guess that it probably doesn't take their own feelings of shame away. I think it would only add to it.
That doesn't mean I didn't ever do anything wrong or didn't ever hurt them too! It's just that some of us have a harder time acknowledging that not everything was about something we did, that we didn't do anything to warrant cruel mistreatment.
Somewhere, buried deep inside, we must know that our own happiness and well-being is not less important. Secondly, someone else's mistreatment of us cannot - I believe now - bring them greater happiness and well-being.
In some cases, we may still be in touch and set boundaries; but I know there are cases where it isn't safe for someone to be in touch, and other cases where one grows weary of reaching out; but we can say a little pray for them, when we think of them, and wish them well inside our hearts.
I believe that caring for ourselves – not only physically but emotionally, too - is not selfishness, but the kind of self-love that gives us the capacity to love others, and especially to find those with whom we can have relationships which are "right". In a "right" relationship, we care for one another, not just care in the sense of liking someone, or having fun with them, but also care in the sense of desiring the mutual happiness and well-being of both people.