First, cherish the last time.
I think the first and most important thing is to cherish the last time with pets. Sometimes pets can accompany people for a long time, such as more than ten years. Sometimes pets can only accompany others for a period of time, such as years, months or even days. No matter how long they can stay with you, you must cherish the last time with her.
Stay with her. Stay with him, try to spare some time to do something you want with him, such as sleeping with him and stroking his fur. Be sure to comfort him, because pets are often very painful and often get sick before they finally die, so at this time, I think you need to comfort her, touch him, hug him and do anything, but don't leave him.
Second, clear your mind and accept the death of your pet.
I think this is the most important point. Many people can't do it after the death of their pets, and they have been crying and sad, and they can't extricate themselves from this emotion. I believe that as your pet, he doesn't want you to do this either. Sometimes some pets have come to the end of their lives, and it's time to leave for Meow Planet. At this time, I think you should tidy up your mood and accept the death of your pet calmly.
Instead of being stuck in this mood all the time, unable to work and making a mess of life, I think if I were your pet, I wouldn't be happy either.
Third, try to make pets leave with less pain.
Many people know that a pet is in great pain at some time before it dies. He often can't eat and sleep, and his whole body hurts. I think it is better to let him leave with less pain and more happiness than to let him endure such pain all the time.