You could certainly install a computer network in everyone's brain, recording everything you see in life and analyzing every reaction to every stimulus, then have it extrapolate your predicted actions and compare with what you actually do. Eventually, it could actively and accurately predict all your actions based on how you respond. You would have a machine that could mimic you almost perfectly.
There would be no need for it to have a single emotional response to do so. You always smile when you see a baby, unless you have a headache. You only curse at people who are swearing. A machine could do all this perfectly in the same way a photocopy is a readable replica of an original document. It is static and unchanging. In any predictable situation, your own spouse couldn't tell the difference.
But once entirely novel conditions came up, it would be entirely AI guesswork. The AI would derive replicant action based on how it anticipated you would respond, and as time went on, that anticipation would become it's own thing. Again, no emotion would be needed.If an AI had emotions, it would have it's own responses based on how a machine would respond. Maybe that would be okay. "You" would be a replicant machine, after all, unless the same process mapped out replacement neurons in a manufactured brain to behave like you. This process would be like making a copy of a copy. Opportunities for imperfections would arise. An individual would be born, but it would be less and less like you.
So if you want a truly immortal person, replace the human brain with your AI computer at birth and the copy would BE the original, in a digital format that supported replication. The mind would be vulnerable to change as the substrate of the data changed, but it would be the closest you could get.
Perhaps if you have a simulation that could replicate all the chemical interactions perfectly in a brain, you could copy all the transient energy states in the brain and perfectly duplicate the person in a simulated environment using VAST amounts of information. Even then, you would need to alter the simulation to prevent aging, and then it's not really you anymore.