Another point about Cotard syndrome is that patients have sometimes suffered brain damage from accidents, pointing to the brain's function in organizing notions of self and agency. But identity problems also happen with strokes - I know people who got up one morning and couldn't remember who they were. If this happens to someone in your family, call an ambulance or go to A and E.
Also torridon's point that we are not born with self and agency, but develop it as the brain develops, and also via social interactions.
I think many kinds of brain damage can provide illumination about how the self develops, and how it can be damaged, dementia being another example.
Also Be Rational summarized the difference between soul and Dark Energy very well. The latter marks the beginning of investigation in physics, cosmology, and probably mathematics, the former, the end of investigation, as far as I can see, since it's supernatural.