Does Buddhist philosophy teach that the self does not exist or merely that it is impermanent?
In the Self-Doer Sutta (below), the Buddha rubbished the notion that there is no self at all. How could one moving forth and back by his own will, say that there is no self at all?
“So, brahmin, when there is the element of endeavoring, endeavoring
beings are clearly discerned; of such beings, this is the self-doer,
this, the other-doer. I have not, brahmin, seen or heard such a
doctrine, such a view as yours. How, indeed, could one — moving
forward by himself, moving back by himself — say ‘There is no
self-doer, there is no other-doer’?”
Saying that there is an eternal permanent self is a view of eternalism, while saying that there is no self at all, is a view of annihilationism. This is the message of the Acela Sutta (which is summarized below from here). Instead of resorting to either eternalism or annihilationism, the Buddha prefers to explain using dependent origination.
Again, when the Buddha was asked by the naked ascetic Kassapa whether
suffering was of one's own making or of another's or both or neither,
the Buddha replied "Do not put it like that." When asked whether there
was no suffering or whether the Buddha neither knew nor saw it, the
Buddha replied that there was, and that he both knew and saw it. He
then said "Kassapa, if one asserts that 'He who makes (it) feels (it):
being one existent from the beginning, his suffering is of his own
making,' then one arrives at eternalism. But if one asserts that one
makes (it), another feels (it); being one existent crushed out by
feeling, his suffering is of another's making,' then one arrives at
annihilationism. Instead of resorting to either extreme a Tathaagata
teaches the Dhamma by the middle way (by dependent origination)" (S.
XII, 17/vol. ii, 20).
Is the self impermanent? Everything apart from Nirvana, is considered a sankhara - phenomena which is conditioned by other phenomena, and/or phenomena which is compounded or composed of other phenomena.
How the self comes about is discussed using dependent origination, and is dependent on the five aggregates of form, feeling, perception, mental fabrications and consciousness. As the five aggregates keep changing, one's identity views related to them will also change. One day you may see yourself as young and talented, while many years later, you may see yourself as old and worthless. Yet another day, you might compare yourself to a wealthier person and consider yourself poor.
Another interesting sutta is the Lute Sutta (below) which compares the self to music which arises from the inter-working of the different parts of the musical instrument. Of course if the musical instrument is played differently, different kind of music comes out. But if you break down the musical instrument to its constituent parts, you cannot find music.
The self is like music, the sentient being is like the musical instrument, the five aggregates are like different parts of the musical instrument, and dependent origination is like the mechanism of how the different parts of the musical instrument work together to produce music.
Just as there is no standalone entity called music, there is no standalone entity called self. To say that there is a standalone entity called self is eternalism. To say that there is no self at all is annihilationism. Both are false views.
"Suppose there were a king or king's minister who had never heard the
sound of a lute before. He might hear the sound of a lute and say,
'What, my good men, is that sound — so delightful, so tantalizing, so
intoxicating, so ravishing, so enthralling?' They would say, 'That,
sire, is called a lute, whose sound is so delightful, so tantalizing,
so intoxicating, so ravishing, so enthralling.' Then he would say, 'Go
& fetch me that lute.' They would fetch the lute and say, 'Here, sire,
is the lute whose sound is so delightful, so tantalizing, so
intoxicating, so ravishing, so enthralling.' He would say, 'Enough of
your lute. Fetch me just the sound.' Then they would say, 'This lute,
sire, is made of numerous components, a great many components. It's
through the activity of numerous components that it sounds: that is,
in dependence on the body, the skin, the neck, the frame, the strings,
the bridge, and the appropriate human effort. Thus it is that this
lute — made of numerous components, a great many components — sounds
through the activity of numerous components.'
"Then the king would split the lute into ten pieces, a hundred pieces.
Having split the lute into ten pieces, a hundred pieces, he would
shave it to splinters. Having shaved it to splinters, he would burn it
in a fire. Having burned it in a fire, he would reduce it to ashes.
Having reduced it to ashes, he would winnow it before a high wind or
let it be washed away by a swift-flowing stream. He would then say, 'A
sorry thing, this lute — whatever a lute may be — by which people have
been so thoroughly tricked & deceived.'
"In the same way, a monk investigates form, however far form may go.
He investigates feeling... perception... fabrications...
consciousness, however far consciousness may go. As he is
investigating form... feeling... perception... fabrications...
consciousness, however far consciousness may go, any thoughts of 'me'
or 'mine' or 'I am' do not occur to him."
The last sutta I would introduce you to, is the River Sutta (below):
At Savatthi. There the Blessed One said, "Monks, suppose there were a
river, flowing down from the mountains, going far, its current swift,
carrying everything with it, and — holding on to both banks — kasa
grasses, kusa grasses, reeds, birana grasses, & trees were growing.
Then a man swept away by the current would grab hold of the kasa
grasses, but they would tear away, and so from that cause he would
come to disaster. He would grab hold of the kusa grasses... the
reeds... the birana grasses... the trees, but they would tear away,
and so from that cause he would come to disaster.
"In the same way, there is the case where an uninstructed,
run-of-the-mill person — who has no regard for noble ones, is not
well-versed or disciplined in their Dhamma; who has no regard for men
of integrity, is not well-versed or disciplined in their Dhamma —
assumes form (the body) to be the self, or the self as possessing
form, or form as in the self, or the self as in form. That form tears
away from him, and so from that cause he would come to disaster. (and
the same applies to the other four aggregates)
What does this mean? When you get hurt, you may say, "I got hurt". This is associating the self with the body. If you are getting old, ageing and dying, then you are suffering. You suffer because you associate your self with that which is getting old, ageing and dying. This shows how associating with the self causes suffering.