There are three ways to respond when another lashes out at you, yelling and complaining.
The first one is to stay quit and indifferent, and allow the other to explode with anger.
The second one is to lash out right back at him/her.
The third one is to calmly and pleasantly respond to the ‘what’ and not to the ‘how’. Meaning to the issue and not the way the issue is being presented (with yelling etc,).
The first way makes the other person really miserable.
The second way discourages the other person.
And the third way is the middle way, the golden way: it allows the other person to repair, and it brings peace and love to the both of you.