I have 4 cats and one is very old. She has lost so much weight that we thought she was starting to get a cancer. We took her to the vet and they checked for any problems that could have caused this. $500 later, they still had not found out what was wrong. They wanted us to bring her back for more tests. We watched her for a few days and decided that she was happier at home and it was not worth it to put her thru more trauma.
She also has a hard time eating and throwing it up. I found a food that she can almost always keep down. It took a few different tries to find the best one. She doesn't eat much but she "usually" keeps it down. I also add water to it and stir it real good, so she is "eating something" instead of just water. (The "pate" texture works the best for dissolving into water.)
The other thing to do is just love her. We know that our Mindy will pass soon. So, we just keep her calm and comfortable, with love and attention. Always remember that she loves you and when she goes, you gave her all the love you could.
I hope she feels better soon. And I hope you feel better also.