That is quite fine, that you have a coping technique that lets you maintain your serenity. Your serenity and health are what are important.
That is great that you are able to separate yourself, at least somewhat, from other peoples' moods! I would say it's a good thing that you have that empathy. It's good, in my mind, that we care about others. But it's also a valuable skill not to let ourselves get "sucked in" by someone else. We need to find a balance.