What is Ego?

The lower self?  The animal side?  The qualities that cause disunity and dissension in the world like hate, envy, jealousy, deceit, rage, etc etc... It's the side of you that thinks only about itself and what things will benefit or relieve itself from immediate discomfort and what things will bring immediate personal pleasure.  Now I've gone through life thinking that I need to throw out my ego.  Trash it because most of the stuff I've mentioned above has no real use towards creating peace and harmony in this life... or so I thought.  A friend brought up an interesting point the other day.  On how the ego just aint all that bad.  It IS what I mentioned above but it's also something else.  My friend mentioned it could also be the desire to eat, to sleep, to find shelter, to survive, to protect oneself, to set boundaries... The ego is not be thrown away but rather balanced and controlled by our Higher Self.  It's funny how our understanding constantly evolves, and scary how easy it is to believe we know.  A few hours ago I knew the ego was bad, that some part of me was bad.  We're not bad though, we're perfectly designed to grow, to reflect on our actions, and to grow from them.  The ego can take control of our lives and that would be very bad, but it also can be our grindstone, sharpening our dullness to a fine edge, a beautiful edge.  I wonder what happens to the ego when we die?