Our attachment to the ego is the cause of many of the problems in our lives. The insatiable need to be right over being happy will drain your life of joy. The ego's inclination for superiority, is often running the show.
When being dictated by our ego, we are judgmental of others. This means we are fear driven. We are trying to control the situation or the person. We can't be kind and generous when we allow the ego to dictate our thoughts and emotions.
"The ego is not who you really are. The ego is your self-image; it is your social mask, it is the role you are playing. Your social mask thrives on approval. It wants control, and it is sustained by power, because it lives in fear."
As Deepak Chopra states here "the ego is not who you really are", it is your mask, it's who you'd like to be if you weren't so scared. It is a survival tactic in most cases, a means of continuing your day to day life. It helps you to function in the world. It is protection from being hurt. If you use your ego to be a large tough guy, you can beat whatever is after you; and your greatest fear is that as yourself you cannot. But anything that is fear driven is going to cause you more complications in the long run.
Given a choice, I'm sure we would prefer to be compassionate to ourselves, as well as others. Pay attention to what your mind (ego) is saying, and decide whether it serves you as the person you prefer to be. You don't have to believe everything you think. You do have a choice about how you act and what you say. It's up to you.