I think the most extraordinary instance of a production completing despite the death of an actor is The Imaginarium of Doctor Parnassus (2008). During a break in principal photography, actor Heath Ledger died of an accidental overdose. Director Terry Gilliam suspended production temporarily, but finished the film with a solution that was, in my opinion, sublime.
There were essentially three major sequences left unfilmed at the time of Heath's death, all set in the Imaginarium. CGI was discussed for a time, but in the end, each of the Imaginarium sequences was played by one of Heath's friends (Johnny Depp, Jude Law, and Colin Farrell, who all donated their fees to Heath's daughter Matilda). Given that the Imaginarium was, after all, a fantasy world, the sudden change of the character's appearance worked remarkably well.
There were a few other tricks they had to pull to cover some other missing footage, but all in all, it was surprising how nicely the film came together.