Unintended behaviors tend to arise when our internal stories are taken at face value. When I believe that someone is a bad person, impulses arise to defend myself, to argue, or to criticize.
When we look closely, we see how stories are attempts to manage unpleasant emotions. Our habitual stories are very convincing, but stories are just stories, and retelling them again and again just reinforces the emotions that give rise to the stories.
Aren't disturbing emotions a reaction to protect or enhance some sense of self? In the long run, engaging in reactive emotions just reinforces our suffering; they are "negative" emotions because they exacerbate suffering.
That sense of self is also a reaction -- a contraction that tries to dispel the confusion of not knowing how things actually are. Awareness is mistaken for a self, and perceptions are mistaken for other selves or objects. Even our own thoughts and emotions are regarded as other, objects to be grasped or opposed depending on whether they are pleasant or unpleasant. We construct a habitual way of being that becomes our "self." When we stop grasping at the sense of self, its defensive reactive emotions also stop arising.
As the stability and clarity of attention deepens, we see all this more deeply, and we can begin to bring stability and clarity into more situations. There is a progression, a capacity that grows over weeks, months, and years. Practicing at the edge of our capacity, so that we are sometimes failing and sometimes succeeding, is the optimal way to train.
In the meantime, there are some practices that are helpful.
Form clear intentions. Forming intentions aligned with our deepest values helps our behavior and thoughts tend toward what we actually intend. An example might be to not say unkind things when frustration arises. Another example might be the intention to cut self-centered stories as soon as possible, because we see that they are exacerbating the suffering. Forming a clear intention plants a seed that definitely bears fruit; following through on an intention creates the conditions for the seed to grow and the fruit to appear.
Cultivate healthy conditions. We can use our intelligence to take care in situations that overwhelm us. We have to relate to people at work, but we don't necessarily have to hang out with them at lunch or in the evening. We can't avoid meetings with difficult co-workers, but we can try to schedule them when we are relatively calm and centered. Ultimately we know that the apparent "cause" of our reactions is actually just a trigger for our own emotions, but we can take care of ourselves and others by being careful to minimize the situations that create turmoil. Alternatively, form relationships with people who share your deepest values, and create the conditions for your practice to thrive.
Share the benefits: As the benefits of stable and clear attention take hold, we can dedicate those benefits to the welfare of all beings. We can in intention and in practice share the benefits as much as possible, even with those who are triggers for our reactions. This will deepen our capacity. It will give us a growing ability in difficult situations. And eventually it changes our relationship with challenging emotions and challenging people. This is often difficult to see in moments of disturbance, but when we sincerely try it, we see how it works over time.