It's hard when it happens especially when it's sudden but putting them out of their pain is the kindest (albeit the hardest) thing to do.
My parents had to do just that on Friday when one of their cats became ill, he was my Dad's little fluffy companion (the only one he allowed upstairs), he would wait to be groomed in the evening, loved being the centre of the action, he would sit on the dining room table or one of the chairs if people were stood around talking(everyone loved him and everyone that met him wanted him). They noticed something was wrong on Thursday night when he didn't go for his regular grooming and on Friday he hardly moved so my Dad went straight to the vet, they operated straight away and found he had cancer and a ruptured spleen. It was so sudden there was actually nothing they could have done, he also showed no signs of being ill until Thursday. When they went to see him Friday night they said it was just like he was sleeping. Now there is this big hole where he should be, you go round there expecting this big ball of fluff to come and greet you and he doesn't. He was special because he was dumped at the side of the road as a 4 week old kitten(the RSPCA reckon because he wasn't the perfect Maine Coon) and hand reared so he just loved being around people and was a complete clown to go with it.