I am so sorry about your loss.........sara
Oh I am so sorry your dog died like this. You must feel so sad. You have my sympathy.
It sounds as if your dog had a terrible infection, or some other distressing condition, which was probably very very serious. I do not know what. As have2kids suggested, if he was not up-to-date on his vaccinations, it is possible he could have contracted Parvo Virus. This is a virulent and horrible infection, and often does result in death.
The medications the vet prescribed to treat this were probably overwhelmed by the infection, which had already 'set in' so badly with your dog that there was little hope of recovery at that stage. But at least you tried. You took your dog in for treatment. That was a good thing to do for him.
Remember all the good times you had with your friend. I am sure he loved you, and had a good life with you.
Sorry again that this had to happen.
Was your dog up to date on his vaccines? Did they test him for Parvo?