There is the other matter about memory. Research clearly shows that memory is not always accurate and that it can be altered though confabulation, hallucinations, false memory implants and many other factors. Who you perceive yourself to be does not always have to be correct even if you are absolute sure that what you remember is correct. Humans have a great capacity of imagination but we all imaging different things.
If we could duplicate every function of our brain is it sill “me”?. For years I have planned to write a short science fiction story based on a world were a Star Trek transporter was used all the time. A traveller, who had used this device many times, experienced a mal function with the result that the device created two persons instead of one. When the two finally meet, they realize, that since they were both convinced before that each was the real person, that neither of them was. Their awareness and memory up to the point of the mishap were exactly the same but from there on their lives were different, so they suddenly understood that neither of them was the original, the original died when he took the first trip using the transporter and that each trip was a suicide, although the duplicate, because of the intact awareness and memory had always believed he survived the trip so did not hesitate to use the device over and over again.
What am I trying to tell you here? Science has established as a fact that our “self” is totally depended on your brain function. When parts of the brain fails or is faulty, it affects our “self”. There are many brain failures such as genetic defects, mental retardation, injuries, mental illness and so on, some are born with defects, some are obtained later in life but they all affect the “self”. The only way that we can speculate an after life exists is that there is a spiritual parallel world that records our memories, which defines our self awareness, as a duplicate of the actual brain function so that when the brain dies these memories are preserved and live on in some other dimension. Therefore your “self” would be identical, with all its shortcomings and defects of your real life experience. If the memories are altered it isn’t you any more. Will babies grow up in the afterlife, retardation and mental illnesses cured, old age reversed, bad memories wiped out? In that case you are, just like the patient with amnesia another person. The supposition that an afterlife exists is therefor a moot point. If there is, you cannot experience it. You died when your brain died, even if a duplicate lives on forever, convinced it was you.