There may be an option of referring the co-worker to a help program. An outpouring of support and energy can result. You sometimes see a staff come together behind someone in very moving ways. But my advice is to pace yourself. Share the load among workers.
Cool professionalism is what's wanted, a steady compassion, a reasoned compassion.
You're pacing yourself, doing what you can to be supportive, then moving on. Notes, e-mails, voice mails can be helpful, but only in uplifting tones, watch out for the obituary mode. If there's a hospital visit to be made, do a short one, never a long one. Now, this brings us, too, to the question of judgment. Let's say the issue is lung cancer brought on by smoking.