This is the most difficult part about loving a critter, my heart goes out to you. Only you know your baby and I believe they tell us when it is time.
For mine I tend to be willing to spend any amount of money if the condition is treatable. If it can be fixed and they can have a good quality of life, sign me up. In our dogs we have done 4 knee replacements, 2 colon resections for obstructions, years of seizure medications and a $2,000 dental on a 12 year old dog without regrets. With our cats I did ear sticks and insulin injections at least twice a day for 4 years, chemotherapy for two cats with lymphoma which interestingly enough although expensive is often very treatable for 1-2 years and a course of radiation for a cat with hyperthyroid.
With regard to quality of life I largely depend on whether they are willing and able to eat. To me if they have a condition that is not going to improve and they are to the point where they feel so bad that they won't eat, especially tempting treats, then I am fairly quick to help them leave this lifetime. :(