If the many-worlds, or infinite-worlds which seems more appropriate, theory of quantum physics is correct, then in some reality the machine imagined never gets turned off, and so never dies, thus being immortal.  Also, in some reality, you lived a perfect life and so has society and together have managed to perfect the health and healing of the body thus gaining immortality.  And in some reality, eventually, some society will find a way to merge all those realities into one in which the "perfect" reality is chosen by all the "imperfect" realities as being the one in which they would prefer to dwell, and in that "perfect" reality the society may choose to not only merge with all other realities, but to resurrect the dead in those alternate realities by means such as reviving them from genes left over, and from the electromagnetic signatures left over from their thought patterns, resurrect their memories and thoughts throughout all time.

LOL - so you know, anything's possible.  Only one of the many realities has to be able and choose to do this to save all.  Wink