I struggle with what you are presenting. It sounds like radical empathy. See the person who is hurting you, put yourself in their shoes, and then forgive. Voila, the enemy is no longer there. It sounds good on paper, a philosophy as old as Jesus. In principle, it has worked better or worse as I’ve tried to live it through life. I can’t stop seething toward one relative. It goes as far as to maybe see him as an enemy. I wish I could overcome my emotions to change that.
In my Dialectical Behavioral Therapy group, we spend hours discussing how to think and years practicing it. DBT is based on Buddhism, in part. There are also philosophies from this tradition that encourage mindfulness. Discussions of dichotomies such as these come up often.
One of our constant struggles is to accept dialectics: when two opposing things are both true. Here is one: the person is both your ally and your enemy. You can both feel vengeful toward a person and feel empathy for them. There can be both an “us versus them” and “us with them” simultaneously operating in our minds without all being lost. You can protect yourself and embrace the other. It is the delicate balance of these two that drives our behavior. I’m not sure human beings can be fully trained to stop categorizing any time soon. It is our cognitive organizing system adapted through evolution. But, we can be mindful of our thoughts to try to change them.