For years I had know idea my behavior mirrored those around me. I literally became their persona and would talk like them or act like them, if that makes sense.
We begin to see who we are, identifying behaviors or emotions that are not ours. Recharge, switch it up or whatever works for the self.
Someone once gave me a tip or"washing my hands"with cold water while releasing the current conversation. Meaning, we identify negative environment and we are "washing our hands"of it.
There are others tools....
Glad you wrote about this, awareness is key. :)