I'm very sorry to hear that. In most cases like this there is usually an underlying problem that develops for weeks or even months. Chinchillas are good at hiding illness until it's progressed to the point of no return, which is why I always recommend weighing a chinchilla at least once a week. Gradual weight loss usually indicates something is wrong and should be checked out. Their fecal output should be monitored each day to check for consistency and volume, which can also be an early warning sign.
Without being able to examine the animal first hand there is not much I can determine. In most cases like this it is tooth problems that lead to an infection but it could be anything from a respiratory infection to food poisoning or even complications from having an improper diet.
Here are some things to check:
Diet. Chinchillas should be getting loose hay and pelleted diet. If they are given vegetables or too many treats it can kill them. If they
are not getting loose hay their teeth will deteriorate and this is fatal. Make sure the food smells dry and appears normal. Food poisoning is a well known cause of premature death.
Water. Make sure your water is dispensing properly. Check water every day.
Breeding. A chinchilla that is not bred with care is often prone to chronic tooth problems which are ultimately fatal.
Environment. Chinchillas must be kept below 75 degrees. Much above that can cause overheating, seizures, and death.
Stress. Chins can be very sensitive to changes in enironment and noisy animals like cats or dogs. Stress can kill if it not managed.
Other things to consider are exposure to lead paint, electrocution (chinchillas love to chew power cables), injury from falling, and parasitic infection.
Chances are you will need to obtain syringe feeding supplies and instructions from your veterinarian. If you can do that today that will be best. If you can't try to feed a mash of pelleted diet mixed with water and see if your pet will eat it. I suspect it's been off its food. Most health problems coincide with anorexia in chinchillas. Other than that your best option is to wait until you can get it examined.
I strongly caution about veterinarians. If you can't find one that is experienced with chinchillas specifically it will be very unlikely you will receive competent care. Incompetent care is often fatal. You may be better off leaving your pet in its cage and making sure the room is quiet. This will minimize stress and exertion until you can determine a better strategy of care for your pet.