I was rewatching Sword Art Online and I notice that Heathcliff KILLS him and yet, he is able to come back and finish off Heathcliff, how is this so?
Logically, there is a delay in between the death flag being detected and the NerveGear frying the brain, which is explain by how a Revival Item (Divine Stone of Returning Soul) can be used within 10 seconds of a player's death.
However, as for how Kirito, whose HP was 0 but was still able to affect Heathcliff, was explained by Kayaba Akihiko when he congratulated Kirito for doing something that went beyond the system by using the power of the human will. This concept is reasserted when Kayaba appears before Kirito in ALO and reminds Kirito about how he acknowledged this.
It's more of an anomaly rather than any sort of plot hole. In essence, Kirito shouldn't have been able to do anything when his HP reached 0, but he was still determined to end the game because Asuna believed he would end the game for her sake. That determination allowed him to transcend SAO's rules.
Kirito didn't come back to life. The whole "You are dead" and then scattering to pieces, and then coming back to life was the anime's dramatization. It was never like that. It was simply there to say that Kirito's mind had accepted death. However, Kirito had not died in real life yet, and he had a sudden burst of will and resolution to live, by which he then altered the game's so called "rules". This is not a bug, it is simply because the virtual world they lived in was, well, virtual. In a way, it's simply an image projected by the brain, and is supported by a system. Because he had a strong resolution, he was able to defeat the game's rules just in time to defeat Heathcliff.
However, this is not the end of it all. Asuna's died way before this happened. To explain why she was able to survive: Heathcliff had turned off the system's mechanism of killing a person in real life by frying the brain upon in-game death, which was an in-game module, right before the duel started. Thus, even though Asuna had died in-game, she was not killed in real life because Kayaba had disabled the module that fries the brain. The area they were in at the end was neither an imagination, a dream, nor any kind of afterlife. It was a special area Kayaba created in order to talk to Kirito after the duel. Whether he had won or not, Kirito would meet Kayaba in that area
Kirito need to live on was great enough to where he could mentally hack the game sort of so he delayed the deleting proses long enough for him to kill Kayaba. Also because of Kayaba being defeated, he did not have to hold on any longer he was already safe. Also to correct what another said, Asuna did not die because the creator of Alfhiem Online spent a long time gathering her very essence and sending her to his game before the Nervegear fried her and was under his control.