In most spiritual circles, the ego gets a pretty bad rap. The reason for this is that the ego, to some extent, is the principle in our psyches that separates us from one another, while spirit is the principle that shows us that no such separation exists. Sometimes the ego is depicted as an almost demonic figure that keeps us from realizing our true nature. But at its most basic, the ego is simply a tool that helps us organize the various aspects of our personality so that we can function in the world. In this sense, the ego is simply a way for us to understand and attend to ourselves at the same time as we understand and attend to the world around us. The ego is a tool that we use to navigate the world.
Perhaps the problem is that the ego sometimes gets out of control. This happens when the higher self loses control of the psyche. The psyche then falls under the leadership of the ego, an entity that was never meant to lead. The ego is meant to be definitively in the service of the higher self. When this relationship is functioning, the ego is a useful intermediary representing the whole self but not thinking that it is the whole self. Then, it is almost as if the ego is the self playfully pretending to be the separate entity called "I." Like an actor, the ego plays the roles that the world asks us to play in order to be part of the program. In this way, the ego can be a tool enabling us to be in the world but not of it.
As long as we are in touch with our higher selves, our egos are not a threat. They are simply useful tools in the service of spirit. We keep our egos in check when we continually nurture our awareness of who we really are. Then our egos are free to serve without trying ineffectually to rule. It is healthy to have ego, but like all things in life, ego functions best when it is in balance and harmony with your whole self.