I'm no expert, but if your dog is acting depressed, scared, timid and is hiding from you, it sounds like she could have a case of doggy depression. :(
Depression in dogs can happen for a number of reasons, such as a traumatic event or a constant stress in their environment, or as a result of an injury that is causing them a lot of pain. There are a few steps you can take to see whether you're dealing with depression in your chihuahua, according to thedailypuppy.com. Of course, you should see a vet as soon as possible to determine what is going on with your pet.
1. Observe her behaviour
From what you've said, it sounds like you're already doing this. Make sure you keep watching your chihuahua to see how she acts, and whether it happens at certain times of the day, whether it is constant or whether it disappears after a few days.
2. Watch what she eats
Depressed doggies often won't eat as much as they should. To any owner, this would ring alarm bells. Try to make sure she eats all of her food. If you've recently changed the food you give her, try feeding her some of the old variety. If she doesn't go back to normal, it is likely there's something else at play.
3. Look for hidden injuries
I know that you said that she has been hiding from you, but try to gently hold your dog and look for any sign of injury all over her body. Sometimes an injury that has been missed that is causing a lot of pain can cause temporary depression in dogs. If she's not eating her food, it could be that she has a tooth problem, which can cause a lot of pain.
4. Look for other possible causes
If none of the above seem to shed any light as to why your dog is acting depressed, then look for some other causes. The death of another pet in the house or a change in environment or routine can cause a dog a lot of mental disruption. Also some diseases such as Lyme disease can cause depression, so check to see if your dog has any mucus around her eyes and nose or any trouble breathing to see whether she may have caught an infection. You asked whether she could have gotten something bad and ate it; this is a possibility, if it could have caused infection in her. Your best bet is to make an appointment at your vets where they will be able to help you a lot more than I can!
A video I found on YouTube from a vet says that dogs don't really suffer from depression, and that they can just become disorientated and lethargic. He gives you some ideas on how to treat this kind of disorientation, which you might want to look at here:
Good luck, and I hope your chihuahua gets better soon!