I love to study the ego. I have read many books that discuss this topic and how to move beyond it but the one I'm reading now is by Eckhart Tolle, A New Earth; Awakening to Your Life's Purpose.
From the book . .
"Ego is always identification with form, seeking yourself and thereby losing yourself in some form. Forms are not just material objects and physical bodies. More fundamental than the external forms - things and bodies -are the thought forms that continuously arise in the field of consciousness. What you may be aware of as a voice in your head that never stops speaking is the stream of incessant and compulsive thinking. When every thought absorbs your attention completely, when you are so identified with the voice in your head and the emotions that accompany it that you lose yourself in every thought and every emotion, then you are totally identified with form and therefore in the grip of ego."
"Once you realize what the ego is and how it works [you will find peace]. When forms that you had identified with, that gave you your sense of self, collapse or are taken away, it can lead to a collapse of the ego, since ego is identification with form. When there is nothing to identify with anymore, who are you? When forms around you die or death approaches, your sense of Beingness, of I Am, is freed from it's entanglement with form: Spirit is released from its imprisonment. You realize your essential identity as formless, as an all-pervasive Presence, of Being prior to all forms, all identifications. You realize your true identity as consciousness itself, rather than what consciousness had identified with. That's the peace of God. The ultimate truth of who you are is not I am this or I am that, but I Am."