I’m not writing epic fantasy, so I couldn’t populate towns and countries the the number of dead (no, I still haven’t read or watched Game of Thrones, but it’s got a reputation). That doesn’t mean I don’t have characters that either die during the book or have died before the book began.
Some of those dead characters even talk.
How you’ll deal with dead characters and character death’s will depend on your genre and your intent. You might have the protagonist’s father show up as a ghost to give him important information (though good luck having people take that as serious literature–it would be like starting your story off with witches*). A dead character might narrate (The Lovely Bones is noted for this). Or we might only see the character through the artifacts of their life, whether those are letters, emails, Facebook messages, or simply other characters talking about them.
If you’re going to write a dead character: how important is the timing and manner of their death? Is it a secret? If so, do we as readers know the secret? Do characters know but the information is kept from us? Each of these choices will shape the tone of the book.
Sometimes, it’s ambiguous whether a character is dead, and that’s okay too. Two classics come to mind where this is the case: The Little Prince (did he die, or did he travel back home?) and Frankenstein (did the monster go and finish himself in the ice fields as he wrote he was going to do? Many movies since have assumed he didn’t, but the book is unclear. It’s tough to write a letter saying “I’m dead.”)
In my own books, I have one book narrated by a dead tiger, and dead characters play roles of various importance in my other books. If you don’t have any dead characters — why not? They’re fun. (Please consider this advice carefully if you write for young readers, but even there, there is room.)
*Shakespeare. That’s the joke. Shakespeare wrote a lot of fantasy.