The ego is neither a thought nor the identification with thoughts but it is what identifies with them and uses the thoughts and imagination to express itself.
The ego is crystallized energy in the astral body. The egoic energy is essentially the desire and its modifications such as greed, avarice, gluttony jealousy, impatience, the likes and dislikes and the negative emotions.
The ego of gluttony for example uses the thoughts and imagination to satisfy its lust for pleasure through the food. Until your desire to be fulfilled, the desire assumes also the form of impatience, anxiety and uneasiness and if something prevents you to get what you want the desire modifies as anger. If the food is not up to ego’s expectations and imagination then desire assumes the form of dislike and dissatisfaction. The same happens with all others desires for pleasure, fame, recognition, power, comfort and possessions etc.
This mechanism of ego's identification with thoughts and imaginations is unconscious, compulsive and mechanical. Its function doesn't depend on our will and reason. Ego uses the thoughts and the intelligence of the intellect in order to find the ways and the means to fulfill its desires.
Of course we can get rid little by little of this mechanism by developing self-awareness, dispassionate auto-observation, by enquiring the nature of ego and desire, how happens the identification, by finding ways to stop identification and develop self-awareness, to increase the sattva guna and reduce the tamas ans rajas gunas from the mind etc.
The thoughts may be charged up with positive energy (sattva, love...) when we are tuned with our true nature and our mind functions in the sattva guna mode and on the contrary with negative energy when we are identified with the ego and the thoughts are expressed by some egoic tendency, for example from jealousy.
Thoughts are also energy and have the power to create realities, but only when they are fertilized by emotion and we contemplate them from a higher state of consciousness. That’s why when we do positive affirmations (I am peace, for example) and contemplate in these thoughts we must feel what we say and be conscious of the center of our existence. Otherwise they will remain on the mental level.