So glad to hear he's feeling better. What a worry for you.
Our Jack had something similar a few week's ago - not as severe though. He started with hives which he had for about 4 days, although he was well in himself. Then just when we thought he was getting better he suddenly started swelling underneath and round his sheath and his hair started falling out in lumps. He was put on antibiotics and we had anti-fungal wash and antiseptic cream to be on the safe side while we waited for the tests on his skin/hair to come back. But, as the vet expected, the tests didn't show anything so vet said it was most likely an allergic reaction and we'll probably never know to what. Jack lost weight quickly too but that was because he stopped eating his tea when we put the antibiotics in -we tried garlic to mask the taste but it didn't work so we ended up putting in mollasses, which did the trick.
His hair is still falling out - vet said because the follicles have died it will continue to fall out until his summer coat comes through - luckily that's happening pretty quickly now so a lot of him looks ok, he just has very patchy legs!