Birds, even pet birds, are very prone to hiding illness! People who have owned birds before know.. If you can SEE that they might be sick..Honestly you needed to get to a vet YESTERDAY! Because any sign of illness can really mean they are on their deathbed. Unless you obsessively watch your bird for any subtle changes in activity throughout the day, which not many people do. That's why most bird deaths are so sudden! They just didn't want to tell us what was wrong. Dehydration can kill a bird in very few days, it's shocking.
If the bird died..I'm sure he was very very ill when you found him. He was just happy to have a warm home and I'm sure you being there helped him hang on a little longer! You did a great thing for the animal!
Birds and humans can transmit their diseases very easily! Generally speaking almost all flues came from birds(which is why 'bird flu' was so weird to me!)
So you very well could have caught something! Birds are big parasite carriers as well, so be careful. But you could also just feel sick from feeling bad :( I tried to save a baby squirrel once that didn't make it, and I got so ill because of it I threw up! Bleh. Could also be unrelated