I looked death in the face. All right, I didn't. I glimpsed him in a crowd. I've been diagnosed with cancer, of a very treatable kind. I'm told I have a 95% chance of survival. Come to think of it, as a drinking, smoking, saturated-fat hound, my chance of survival has been improved by cancer.

I still cursed God, as we all do when we get bad news and pain. Not even the most faith-impaired among us shouts: "Damn quantum mechanics!", "damn organic chemistry!", or "damn chaos and coincidence!"

I believe in God. God created the world. Obviously pain had to be included in God's plan. Otherwise we'd never learn that our actions have consequences. Our cave-person ancestors, finding fire warm, would conclude that curling up to sleep in the middle of the flames would be even warmer. Cave bears would dine on roast ancestor, and we'd never get any bad news and pain because we wouldn't be here.

But God, Sir, in Your manner of teaching us about life's consequential nature, isn't death a bit ... um ... extreme, pedagogically speaking? I know the lesson we're studying is difficult. But dying is more homework than I was counting on. Also, it kind of messes up my vacation planning. Can we talk after class? Maybe if I did something for extra credit?

Why can't death - if we must have it - be always glorious, as in The Iliad? Of course death continues to be so, sometimes, with heroes in Fallujah and Kandahar. But nowadays, death more often comes drooling on the toilet seat in the nursing home, or bleeding under the crushed roof of a teen-driven SUV, or breathless in a deluxe hotel suite filled with empty drug bottles and a minor public figure whose celebrity expiration date has passed.

I have, of all the inglorious things, a malignant haemorrhoid. What colour bracelet does one wear for that? And what slogan is apropos? Perhaps it can be embroidered around the ruffle on a cover for my embarrassing little doughnut buttocks pillow.

Furthermore, I am a logical, sensible, pragmatic Republican, and my diagnosis came just weeks after Teddy Kennedy's. That he should have cancer of the brain, and I should have cancer of the ass ... well, I'll say a rosary for him and hope he has a laugh at me. After all, what would I do, ask God for a more dignified cancer? Pancreatic? Liver? Lung? No doubt death is one of those mysterious ways in which God famously works. Except, on consideration, death isn't mysterious. Do we really want everyone to be around for ever? I'm thinking about my own family, specifically a certain stepfather I had as a kid.

Then there's the matter of our debt to death for life as we know it. I believe in God. I also believe in evolution. If death weren't around to "finalise" the Darwinian process, we'd all still be amoebas. We'd eat by surrounding pizzas with our belly flab and have sex by lying on railroad tracks waiting for a train to split us into significant others.

I consider evolution to be more than a scientific theory. I think it's a call to God. God created a free universe. He could have created any kind of universe He wanted. But a universe without freedom would have been static and meaningless - the taxpayer-funded-art-in-public-places universe.

Rather, God created a universe full of cosmic whatchmajiggers and subatomic whosits free to interact. And interact they did, becoming matter and organic matter and organic matter that replicated itself and life. And that life was free, as amoral as my cancer cells.

Life forms could exercise freedom to an idiotic extent, growing uncontrolled, thoughtless and greedy to the point that they killed the source of their own fool existence. But, with the help of death, matter began to learn right from wrong - how to save itself and its ilk, how to nurture, how to love (or, anyway, how to build a Facebook page), and how to know God and His rules.

Death is so important that God visited death upon His own son, thereby helping us learn right from wrong well enough that we may escape death for ever and live eternally in God's grace. (Although this option is not usually open to reporters.)

I'm not promising that the Pope will back me up about all of the above. But it's the best I can do by my poor lights about the subject of mortality and free will.

Thus, the next time I glimpse death ... well, I'm not going over and introducing myself. I'm not giving the grim reaper fist daps. But I'll remind myself to try, at least, to thank God for death. And then I'll thank God, with all my heart, for whiskey.

• PJ O'Rourke is a correspondent for the Weekly Standard and the Atlantic

© Los Angeles Times