I am so sorry for your loss~~~~~~~sara
I have no idea as to what could have possibly caused this to happen to your chihuahua. I only want to offer my deepest sympathy for the loss of your pet.
I think Moms4tne's answer makes perfect sense--an internal injury.
She yelped in the middle of the night and then died a few days later after blood foaming out of her mouth and nose? I'm no vet but that sounds to me like an internal injury. Where was she in the night when she yelped? Did you investigate? Could something have fallen on her - or someone have hurt her, like maybe accidentally stepped on her or even kicked her? I hate to make such a suggestion, and probably without an autopsy you'd never know for sure - but it just doesn't make sense that what you describe as an animal who seemed perfectly healthy would suddenly just be bleeding internally and then die.
I just wanted to say how sorry I am for your loss. I do not know the answer. You will have to ask a vet. It does seem such a sudden death.