Magister Nemo's answer, I think, helps to remove what appears to be a dilemma. But, I want to chime in, too.

Consider what happens to someone who is rendered unconscious, whether he or she be totally knocked out by a head trauma, successful anesthetic procedure, or even by ingesting date rape drugs slipped into a drink. Much easier, of course, to consider it if you have ever been so rendered yourself.
What happens when someone goes unconscious? Notwithstanding amnesia, you would have memory of what lead up to unconsciousness, and what occurred after regaining consciousness, but nothing to say of when you were under. This of course, assumes you
were rendered unconscious, not just paralyzed to experience surgery in painful detail as in anesthesia recall, for instance.
During that period... where are "you"?
Perhaps I am wrong. I am no scientist or anesthesiologist, but I have been rendered unconscious before. Maybe I did dream during that time or had some other experience, but no memory of it. I can put it on a time line, where pluses represent consciousness and underscores unconsciousness:
|+++++++++++++++++++__________________________++++++++++++++++++|
That time line does not read "I exist", "I do not exist", "I exist", or "I am alive", "I am dead", "I am alive", or perhaps more sensibly, To me, the time line could just have easily been this:
|+++++++++++++++++++++++++++++++++++++|
Eight hours of surgery, a minute on the mat, or waking up naked in a puddle of puke outside a dorm makes no difference. Complete continuity of memory. The only reason one would be aware that he or she were unconscious would be
that continuity of memory that pointed to it. For that reason, the timeline does look like this, and more closely matches "I am alive" and "Whoa, I was out there for a minute, huh?":
|+++++++++++++++++++__________________________++++++++++++++++++|
So, let us take the first timeline and play with it a bit. This is Fred's timeline, where he was rendered unconscious by anesthesia:
|+++++++++++++++++++__________________________...
While Fred was unconscious, mad scientists mapped his memory with a sophisticated brain scan and inserted the memory map into...
Sue.
Both Fred and Sue are brought back from unconsciousness. Fred is feeling a bit groggy and has to go to the bathroom really bad, and Sue is wondering "What the F**K is going on here?!?"
Fred and Sue's timeline, their memory, both began as such:
|+++++++++++++++++++__________________________
To both of them, it would be not much different than this:
|+++++++++++++++++++
Upon waking, Fred and Sue are the same person, but it is quite clear in this--I hope, amusing--example that Sue is already moving away from being the Fred s/he was before, and so is Fred.
Fred:
|+++++++++++++++++++I-am-groggy-and-have-to-pee-really-badly
Sue:
|+++++++++++++++++++Put-yourself-in-Sue's-shoes
I think this also neatly raises a problematic issue: consent. Had Fred consented to the insertion of his memory into Sue, well...
You might think that it kinda points to your "ghost in the machine".
Suppose Fred consented to this procedure as a radical new approach to sex change. NuYu Inc. grew a Sue for Fred, conducted all the psychological evaluations, and etc., and implanted Fred into Sue. Well, the procedure is a smashing success, and Sue wakes up to his new body, overjoyed.
What of the Fred that donated his memories to the Sue?
He is still locked inside the Fred body he never liked, while the other copy of Fred is running around in Sue's body happy as a lark.
But, where is the "ghost in the machine"?
No "essence" or "ghost" of Fred left Fred to pair up with Sue, leaving Fred's body a lifeless husk. Fred is still very much alive, still unhappy in his male body, while Sue is a very happy "Fred" in his new female body. The only essence or ghost that transfered from Fred to Sue was his memories up to that point, and that transfer did not destroy Fred's memories upon lending Sue's.
Speaking metaphorically, I think it better holds that the thread of memory is the program and the brain/human is the computer.
And, what you are asking might be something like "who is running the program?" That might be your ghost in the machine.
Pages 91-95 of the Satanic Bible sheds a bit of light on that ghost, but then... I think it comes back to just what Magister Nemo stated: It would just be another machine.
I hope I do not come across as if I have it all figured out. This is certainly not my case. You may find it worthwhile, as I do, to examine the idea further than to close yourself to it entirely by basically stating, "Once you are dead, that's it. You're dead." Doing so might raise more questions than answers, but what do you prefer more, an unanswered question, or a wrong answer?
Douglas Hofstadter wrote a great book--a few, actually--that prods at this ghost in the machine: "I Am a Strange Loop". It digs into metaphor a bit, too. I think you would find it intriguing.