Hi!
I am very sorry about your loss.
It is unfortunately impossible for me to say what has gone wrong just from your description; you would need a post mortem examination from a vet to find out what exactly was going on.
Loss of hair, weight loss and seizures could point towards a bad case of mange mites (a skin parasite that burrows their eggs in the skin of guinea pigs, which is extremely painful and can be fatal if left untreated or undertreated); but I can only guess. By the time you had your guinea pig seen by a vet they were unfortunately already very, very ill, had stopped eating and their body had started to close down; so the smell is more likely related to that.
Please see a vet promptly in the future, as soon as a piggy of yours is starting to lose hair and is losing weight - the later is always a sign that something serious is not right.
Here is more information which you may find helpful to make more sense of your traumatic experiences:
Death, Dying, Terminal Illness; Human Grieving and Bereaved Companions: Information and Support for Owners and Their Children (the dying guide includes the symptoms of a natural death, several of which you have been witnessing)
Information on mange mites (as mentioned, this is just a guess):
New piggy problems: URI - ringworm - skin parasites
Guinea Lynx :: Mange Mites
Emergency/crisis care and what to do (please note that guinea pigs are lactose intolerant once weaned and need to be fed fibre in a crisis - your vet is obviously not experienced with guinea pigs at all; but it would not have mattered for the outcome anyway in your case):
Emergency, Crisis and Bridging Care until a Vet Appointment
Not Eating, Weight Loss And The Importance Of Syringe Feeding Fibre
I wish you could have found us sooner. I hope that the links can help you make more sense of what has happened.
Please be kind to yourself in the coming days as you will be feeling very upset and very likely guilty, too. The second issue you can work with by learning how to do things better next time round; we can't go back and undo any mistakes but we can always learn not to make the same mistake twice and ultimately save more lives that would have otherwise died.
HUGS