Ego is the worst foe for a human. A man fails in his life if he has even the slightest tint of ego in him.
There may be several reasons for a man to be affected by the disease called EGO. His scholastic nature, money, power and many more. But one day or the other the stimulus for his ego will be deprived from him.
A man thinks that these things (money, power, knowledge) will be with him forever. The truth is that, these elements will be with him as long as he is free from ego. The moment he starts thinking "I have lot of money. I am powerful. I am a wise man.." and so on, those things will start moving away from him and will gradually fade with the passage of time.
He will no longer be rich, wise and powerful.
So what one need to do is, shed off the feeling "I", "Mine". Submit all the happenings whether good or bad at the lotus feet of lord. He will take care of us.
Bhagawan Sri Krishna, says in Bhagavad Gita - "Kadamaiyai Sei! Palanai Yedhir Paaraathey!!"
Sir Aadhi Sankara Bhagawad PadA says in his Bhaja Govindam - "
Maa guru dhana gana yauvana garvam
harathi nimEshAth kAla sarvam
Maayaam mayam itham akhilam hitwaa
Brahmma padam thwam pravisha vidhithvA
", which means - the pride and ego one gets as a result of his affluence in wealth, knowledge, power will be vanishing. They are temporal things. Time will wash away them and make the place clean without any traces of these elements. Only the feet of Brahmman is permanent.
-- Compiled from speeches of various Mahatmas.