The notion of egoism is tied to greed, cruelty & conceit and these are tied to the adherence to a doctrine of self.
One who adheres to the doctrine of self analyzes the senses and what the senses present as self and not self, as personal and impersonal.
One who does not adhere to the doctrine of self rightly discerns that all conditioned things are impermanent and that it should not be and should not occur, they analyze the senses and what the senses present as 'this is stress, this is path to the cessation of stress' and having developed that path they abandon all being, with no residue for a future the stable one's reach the end of all stress & misery.
When one emerges from cessation of perception & feeling attainment it is as if one plunged back into a dream or a mirrage.
How foolish would it be to be stuck in that nightmare for the sake of what is grasped with wrong view to be personal for others when the whole that world is simply conceived & perceived due to delusion.
Form is like a glob of foam;
feeling, a bubble;
perception, a mirage;
fabrications, a banana tree;
consciousness, a magic trick —
this has been taught
by the Kinsman of the Sun.
However you observe them,
appropriately examine them,
they're empty, void
to whoever sees them
appropriately.
Beginning with the body
as taught by the One
with profound discernment:
when abandoned by three things
— life, warmth, & consciousness —
form is rejected, cast aside.
When bereft of these
it lies thrown away,
senseless, a meal for others.
That's the way it goes:
it's a magic trick,
an idiot's babbling.
It's said to be a murderer.
No substance here is found.
Thus a monk, persistence aroused,
should view the aggregates
by day & by night, mindful, alert;
should discard all fetters;
should make himself his own refuge;
should live as if his head were on fire —
in hopes of the state with no falling away.
Follow not the vulgar way; live not in heedlessness; hold not false views; linger not long in worldly existence.
One who looks upon the world as a bubble and a mirage, him the King of Death sees not.
One who abandons delusion has no incentive-desire to conceive & perceive impermanent phenomena and does not grasp elements as personal for this or that being because they know that there are elements and the elements aren't personal, they simply come into play due to the causal relations & requisite conditions.
“Bhikkhus, just as when the stalk of a bunch of mangoes has been cut, all the mangoes on it go with it, just so the Tathāgata’s link with becoming has been cut. As long as the body subsists, devas and humans will see him. But at the breaking-up of the body and the exhaustion of the life-span, devas and humans will see him no more.”
— Brahmajāla Sutta