The ego is illusory but not non-existent!
Who or what identifies with the body or with some object? Who or what desires pleasure? Who or what wants to avoid pain? Who or what decides to stop or keep thinking? Who or what decides to give in or not to a desire? Who or what causes such havoc on human beings, individually and collectively?
No matter how many times we deny the existence of the ego, the ego is there, functioning in our psyche. It is the central factor of our apparent existence.
It is true that the ego is illusory, but the whole universe and the forms (gross and subtle) in it are illusory, since everything in the universe is composed of the same fundamental powers or energies (gunas in Sanskrit), i.e. rajas, tamas and sattva.
Everything that is made of the three gunas is illusory, that is, it has a temporary existence, it has a beginning and an end, it is not sef-existent (its existence depends on something else, - the consciousness), it is not self-conscious, it does not appear in all states of consciousness (states of wakefulness, sleep, deep sleep).
The idea that when we look for the ego we do not find it is false. We can certainly observe the ego as any other egoic tendency, thought or emotion. The idea that the ego is the identification with the body or thoughts is also false. It is the ego that identifies with the body and thoughts. Without the ego there is no identification with the body, thoughts, ideas, emotions, objects or any form whatsoever.
The ego is the agent of our volition, thinking, feeling, decision-making and acting. Depending on the nature of our mind and ego and the way our mind operates at any given moment, there is mechanical thinking, emotional thinking or conscious thinking. Therefore, it is not appropriate to generalize and talk about thinking as if it were only one type of thinking.