From a Buddhist perspective, it is helpful to think of the “self” as something the body does in certain contexts for achieving certain practical ends rather than a static substance or essence that endures. I have described this before but thought this would be a more elegant description.
Similarly, the body generates a certain kind of immune response, for example, in the form of a fever, in the process of combating infections; but this does not mean that that the fever itself represents some sort of metaphysical essence or something. Rather, the fever is just something your body or form (“rupa”, in Pali) in order to achieve certain pragmatic ends in certain contexts. Similarly, “self” arises to achieve certain ends in certain contexts, and its impact can be no less pernicious than a fever itself. Just as we might take medication to get rid of or reduce the severity of a fever, we practice mindfulness in order to get rid of the harmful ‘fever’ of the self.