We have behaviors that are learned and some that come built in. To see what is built in you can hang out with a baby of a few months old. Some of our emotional behaviors come built in and they are very hard to change as an adult even if they don't serve us in a positive way.
My observation is that it is a natural, instinctive response to match the emotions of those around us. Sometimes this can be pleasant like the contagion of laughter. It is easy for us to get caught up laughing with others. Our emotional response can even be manipulated falsely, like when a laugh track on a television show makes us chuckle at something insipid. If I smile at Elliott, who is now nine months, when I'm happy he may smile in response and feel happy. But, I can also smile at him, not feeling any particular happiness at the moment and that makes him smile and he then experiences a positive emotional response. The same can happen with a negative facial expression; I can wince from some sort of physical pain and his mouth starts to frown, a pouty lip forms, and suddenly he bursts out crying. He can bump his head, accept it and move on, but if I shreik at that moment it may cause him to cry; pretty soon he cries every time he bumps his head. Matching of emotions has probably served us as a species and so has stuck with us. It's not even uniquely human. Animals do it as well; in fact, animals interact on a much more emotional level. One dog snarls and shows his teeth and another responds with like behavior. If someone expresses anger toward us we have a hard time not feeling anger as well. Throughout animal and human evolution we have had to match the emotion level of those we confronted or face defeat. A better football team if often defeated by the team whose emotional level it didn't match.
I teach at an alternative high school. Many of the students have lived a traumatically emotion life and deal with everything on an emotional level. The challenge I often face is to not allow their emotions to become mine or I would be on a daily roller coaster ride. The part of our brain that handles emotions are basically the same as a dog's. To be able to help my students and protect myself I have to remain neutral emotionally. I have to use the part of my brain that dog's don't have to address the issues logically and rationally and suppress the part that wants to go where they are emotionally.
I imagine a box of rattlesnakes all rattling and I have to remove them in a particular order. I don't take it personally and get distraught because the rattlesnakes want to strike; that's what rattlesnakes do. I would take precautions and approach the situation rationally. I do the same with students. Last week a student pleaded to leave my class and go catch up on his health class which he said was the only one he was failing. I gave him a pass to go and about halfway through the period passed by that teachers class; she wasn't in her room but did have a class in the gym. My student was in there playing basketball. I asked the teacher if the student finished his work for her. She said she didn't even have him as a student and thought I gave him a pass to play in the gym which a teacher may occasionally do as a reward. I could have become angry that he violated my trust, lied to me, or thought I wouldn't suspect anything but he was just following his own nature; he wanted to play and he would lie to do it. I told him that I could have become angry for the aforementioned reasons but I that I saw him as a boy who wanted to play so badly he would lie. He said that that's what cool about me; that I never get mad. He also accepted the punishment that he wasn't going to be allowed to go anywhere without an escort because he demonstrated to me that he couldn't be trusted.
In our building we like to say that if we go to those emotional places that the kids are at we are not going to win; it's the land that they live in. Our only hope is to stay out of it and use our human brain. You can't take it personally if you get bitten by a rattlesnake or cut off in traffic; it's just things doing what they do as natural as the rain falling. So put on your wire mesh gloves, buckle up, and bring an umbrella because if you don't you should be mad at yourself.
I'm not saying that we should deny our emotions, but they have their place. Our dog Sunshine died in August. We all felt her loss deeply. She was a member of the family, but the loss was so powerful because she had always made us feel good emotionally and that was gone. To be driving up the street and see your dog sit up and take notice and run out to greet you makes you feel good. For another being to be happy just to see you return from the mailbox is pretty potent.
One could view Sunshine's departure as her feeling it was her time to go. Elliott operates on that emotional level. He is always thrilled to see me but he'll grow out of it. There will be the day I get home and he'll be on the computer and won't even look up. I'll know it's time to get a dog again.