Seventh Dalai Lama, Kelsang Gyatso
Whenever a physical illness arises, we usually multiply our suffering by worrying and by pressing mental anxiety on top of it. One should understand that the human body is a composite of elements and agents that constantly are struggling with one another. When these elements and agents fall into disharmony or when external factors such as the many types of evil powers are affected, the various diseases naturally arise with intensity and for long period of time.
Therefore one might as well face up to the fact that during the course of one's life a certain amount of disease is inevitable. When one does fall painfully ill, one should not be concerned with one's own situation. Instead consider the inconceivable sufferings of the hell denizens, the hungry ghosts, animals and so forth whose anguish is infinitely greater than one's own. Ask yourself, "If they must bear such immense pain, how can I not bear this suffering which by comparison is small? If I am so weakened by my suffering, how must they feel who anguish is so much greater? May their afflictions be alleviated by this illness of mine."
Thinking in this way, visualize that you are surrounded by all sentient beings experiencing every type of suffering. As you inhale, visualize that all their negativities and obscurations, sickness and pain ripen upon you, freeing them from all misery, and as you exhale, visualize all good things going to them in the form of white nectar giving them happiness. Repeat this process again and again.
As the benefits of this contemplation surpass the effects of any virtuous actions, any illness should be seen as an excellent opportunity to practice Dharma. Think, "Even if I never recover, I can continue to practice the meditation of taking others' suffering upon myself and giving others peace - a powerful practice unsurpassed by all. Therefore I am perfectly happy to lie here with this illness."
If you can practice this advice from the depth of your heart, there is no doubt that you will be benefited in both this and future lives, hence keep it in mind.