Here's my trick to keeping continuity (I play at a college, so we get player turnover within campagins every semester, and character turnover more frequently than that): the PCs do not exist in a vacume.
Somewhere out there in the wide world, there is someone else who cares if the PCs die, be it a parent, sibling, aunt, unlce, cousin, old roomate, best friend from kindergarten, or the wolves that raised them after the tragic death of absolutly every other living thing in their village. When the PCs die, some one else cares enough to come looking. That person (the new PC) not only joins the party in their over all quest to get the Big Bad Evil Guy, but they are also seaking revenge for the death of their child/sibling/nephew/cousin/rommate/friend/cub [select appropriate]. As the PC body count racks up, the story become that much more personal for the survivors.
A couple ways to promote this is for the PCs to occasionally write letters home -- ensuring that someone will come to investigate when the letters stop -- or write a will -- ensuring that someone will come to collect the dead guy's stuff -- or in some other way make contact with the world outside the party. Other sources of new party members that don't break continuity with the story, are NPCs the party deals with regularly, for instance the barmaid at the inn (who occasionaly lifts a few coins from open pockets) might join the group when the rogue dies. Another option, is through the leadership feat: the first PC dies, and his cohort steps up to take his place in the party. This way the new character is already someone the other PCs know, maybe even trust, who has a purpose to be with the party other than "the good guys pay the best."
Of course, death does not have to be the end of PC either. One of my more memorable PCs was a demon-summoning gnome engineer who died in the penultimate session of the campagign. She returned for the final fight against the BBEG (or the guy the rest of the party thought was the BBEG) having turned
into a demon thanks to a deal she made with the real BBEG. For a less drastic return there are always Raise Dead spells.
