Wow I really feel for you, man.
I hate it when anything's up with my dog (dogs now). Like the other week, my dog, who's 6 years old now, had a lump on her tail and I feared the worst. The vet went through everything to having the tail off to it possibly being life threatening. It ended up being just a minor cyst, but for those 2 weeks I was really down, so I can relate, somewhat, to how you're feeling now and that I've had a dog pass away before.
Hope everything turns out ok for your dog.