While Andrei Volkov provided a very Mahayanist answer, I'll try to offer a more Theravadin answer.
In the Ayacana Sutta, we find that the Buddha did indeed think of himself.
Then, while he (the Buddha) was alone and in seclusion, this line of
thinking arose in his awareness: "This Dhamma that I have attained
is deep, hard to see, hard to realize, peaceful, refined, beyond the
scope of conjecture, subtle, to-be-experienced by the wise. ....."
In the Sabbasava Sutta, we find that both the views of "I have a self" and "I have no self" are wrong, according to the Buddha.
"As he attends inappropriately in this way, one of six kinds of view
arises in him: The view I have a self arises in him as true &
established, or the view I have no self.... This is called a
thicket of views, a wilderness of views, a contortion of views, a
writhing of views, a fetter of views.
My analogy:
If you play a video game, you would be fully engrossed in the role of the character that you are playing. But when you decide to stop playing, you can immediately and instantaneously disassociate yourself from the character. You don't carry with you the identity of that video game character, or crave to become it.
To say that the video game character has a self or has no self, are both wrong views, because it depends on what frame of reference you would use to make that determination. Instead, I would say that in all parts of the game, it is empty of a self.
While the Buddha figured this out and stopped playing when the current "game round" is over, we are still stuck, and having the mistaken self-identity as the video game character, and craving its existence, thus coming back in future "game rounds" endlessly.
Just as in the Suñña Sutta:
Then Ven. Ananda went to the Blessed One and on arrival, having bowed
down to him, sat to one side. As he was sitting there he said to the
Blessed One, "It is said that the world is empty, the world is empty,
lord. In what respect is it said that the world is empty?"
"Insofar as it is empty of a self or of anything pertaining to a self:
Thus it is said, Ananda, that the world is empty. And what is empty of
a self or of anything pertaining to a self? The eye is empty of a self
or of anything pertaining to a self. Forms... Eye-consciousness...
Eye-contact is empty of a self or of anything pertaining to a self.
"The ear is empty...
"The nose is empty...
"The tongue is empty...
"The body is empty...
"The intellect is empty of a self or of anything pertaining to a self.
Ideas... Intellect-consciousness... Intellect-contact is empty of a
self or of anything pertaining to a self. Thus it is said that the
world is empty."