I'm very sorry to hear about your dog! I know it's a tough thing to deal with. About 2 years ago, my dog all of a sudden came down with pneumonia, and had a lot of internal infection from something. I took him to the vet, and they gave him some medacine and stuff, and kept him overnight, but he passed away late that night.
It's alway's tough, but just remember all that good times you had, and that they aren't in anymore pain.