Hello. I have some experience of that and it is such a hard path to tread, I do know how you feel. Paramount is the pain relief for him and you are always worried about the quality of life. Such a desperately sad time for you. You have done everything you possibly can and when you arrive at the point that you have to accept you can no longer look after him especially after all the years you have been together, well - it is very hard for you.
Life is so precious but, as you say, it can also be so cruel. It is hard to pull yourself away from him at times. To see him getting upset as well as being in pain is beyond measure.
I do hope you are taking care of yourself, old bird and, as ever, I pray you can get some sleep. Bless you x