I've had this happen quite a few times in the course of my life. I vent to a partner or a loved one about how someone hurt my feelings and why, only to find that this very person does the same thing. But what's worse is that they knew going into it how I would feel.
What would be the best approach to handle a situation like this?
In the past, I would of been angry. I would of felt rage even. I probably would of word vomited an obscene amount in result. Whether it was viewed as warranted or not. And then I would of felt bad or guilty for doing this afterwards. It wasn't fun for anyone.
------"An eye for an eye makes the whole world blind."-------
Isn't it true that when we seek revenge against another, it is because we are hurting and want to make them hurt too? There is no growth in hurting another person. We stay stuck in an energy that does not serve us. It takes up space in our mind, space in the body, and heart. It actually feels worse to stay stuck then make a change, although, it may be a natural tendency to initially feel this way. Our behavior, our responses, our reactions are what guide how the situation will turn out. We may not initially care about growth or our "higher purpose" of who we want to be in that moment but it will always come back to this in the end. How we go about communicating our pain to others and what we allow to receive back in return.
Think about what being defensive feels like. Your body tenses up, your short or harsh in speech, feeling attacked or on edge, etc. It's not a great feeling. Nor do others respond to it well. They tend to get defensive back. If they don't, they may just shut down and get quiet.
Recognizing our self boundaries are key. When it hasn't been practiced, it's easy to find ourselves being wounded, vulnerable, and mostly angry. Not to mention, if this is a pattern in your life then some work needs to be done in recognizing that. It's also important to keep in mind (as long as you are in a healthy relationship) to learn to give people the benefit of the doubt when it comes to their intentions. Are they usually hurtful or are they having an off day? Do they listen to you and take you seriously? Thinking about the person, good intentions, and their motivation can help bring things into perspective.
If you are in an unhealthy relationship you will notice by the conversations that even when you don't respond in anger they may still reject you or hurt you in some way. It's unhealthy if this is their pattern too. When another person cannot accept responsibility for their actions (such as not being able to apologize even when you effectively communicate your pain) then that's not a road you want to continue to go down and take with this person. The words we speak and the words others speak to us are profound in their effect.