Immediate thoughts and feelings

what about immedite negative thoughts? For example, during a conversation with someone you disagree with. I sometimes get some very negative thoughts like “they are wrong, they always do this, why do they act that way, etc”. I totally understand, we have no control over how other people behave and act. After I have these thoughts, a short while later I am able to be more calm and use my intentional thinking to change my thoughts to produce better feelings. So my question is…is this the right strategy to use, or how else could I prevent from feeling what seems like an immediate anger or negative feeling in the moment?