Mr. Roger's had a GREAT book about the loss of a pet. You might want to read it and get some language to use with your son. When it gets closer to the time your doggie might be dying, you might want to share it with him (your son, not the dog,obviously).
Kids have a very different set of issues around death than adults do, and it is really good you are thinking about this a head of time. It is such a difficult time when a pet dies, and you will be grieving then, so you are smart to get your ducks in row now.
There is a wonderful little piece of writing called "Rainbow Bridge" that has a very pleasant way of imagining "the afterlife" for pets. http://www.rainbowbridge.com/Poem.htm. Ok, it's pretty crappy writing, but a lovely sentiment. Depending on how you feel about the whole heaven, pets in heaven, etc. thing, it might be something positive to share with your son...
I'm hoping you don't have to deal with this any time soon.