When my cat K was younger, about 9 months, she was failing to thrive & I was beside myself with worry. She was Dehydrated and Underweight & she ended up spendinga few days in intensive care. The vet tried everything they could for her - intravenous fluids, antibiotics & anti diarreah medicine since she was going all over herself spontaneously.
Well K came home, and the medicines I was given weren't working. She was still looking ill and going all over herself. However, after a few days, although the vet thought along obvious medical lines such as it being viral or something nasty, I realised, after trying her on the royal canin the vet gave me to tempt her to eat, that she has a digestive problem, and that her digestive problem nearly killed her.
I permantly switched her over to Optimun & Royal Canin dry food, and have never looked back, she has gained so much weight, is so much healthier and the diarreah stopped within days of switching her. She is now very active, weighs a normal weight & still very loving, and I'm glad I realised what was wrong before it was too late.
My point is, sometimes, such violent reactions such as diarreah and vomitting and going off food and loosing weight may seem like OMG! She's dying and there is nothing I can do! but, it could be something as simple as an aquired food allergy that can be fixed like my cat whom I nearly lost before I realised through fluke what the vets couldnt tell me - and thats, that a food allergy nearly took my baby from me.
So my advice is take your cat to the vet, because it may not be something that cant be fixed, and even if it is, the best thing to make your cat experience no pain, may be compassionate euthanasia.