Outwardly, he was a success, having been graduated number one in his medical school class, and becoming one of the youngest professors in the history of his alma mater while directing his prosperous medical corporation.

He had been elected to a hospital board of trustees and founded one of the many medical societies to which he belonged. He was a "doctor's doctor," a man called in to treat such dignitaries as former Philadelphia mayor Frank Rizzo.

And, at age 39, he was dying.

Despite all his medical know-how, all his connections, Marvin Derezin lay helpless in a hostipal bed, delirious with potentially fatal peritonitis with septicemia (a complication of bacteria in the bloodstream), screaming with pain so intense that he remembers feeling. "I can't live like this. I'd rather die."

"And I realized I hated the doctors. I wanted them to take care of my wound, answer my questions and get the hell out of there. I felt their tension and their heaviness and their coldness."

Later, Derezin says, he recognized a piece of himself in those doctors. "I was more of a scientific technician. A lot of times, I was really reacting to the human body as a scientific machine."

After his recovery, Derezin recalls, "I came out of my shell. I started looking at what I was doing and realizing that there were several things I didn't want to do that I was doing that led to my move from Philadelphia to Los Angeles" in 1979.

"I decided my life had been a rat race. I guess I'd been driven to power and then started to drift away from it. I decided to come out here [the West Coast] and have a one-on-one practice, teach and just let things blossom. Now when I see patients, I look at the person as a product of nature, the environment, his family, job, and as a human being with the same kind of emotions and feelings as I have. I'm finding that combining that with my scientific knowledge enables me to see through a lot of problems right to the core."

Derezin is not totally convinced that his new life style is the direct result of his brush with death. "But if this caused the change in my life, yes, I'm glad it happened," he says. "Absolutely."

Illness as opportunity? The sort of kick in the pants one feels grateful for?

Paradoxical as it seems, that is the message being heard increasingly from survivors of life-threatening illinesses and sometimes even those in the process of dying of them.

Betty Rollin, the NBC News correspondent whose experience with mastectomy was the subject of her book, "First, You Cry," recently celebrated the fifth anniversary of her battle with cancer by writing that "although cancer was the worst thing that ever happened to me, it was also the best. Cancer . . . enriched my life, made me wiser, made me happier . . . Although I would do everything possible to avoid getting cancer again, I am glad I had it."

Bookstores are filled with volumes of upheat survivor stories, books such as Karen Osney Brownstein's "Barinstorm," about the vulnerability brain tumor brought to her life, or "The Man Who Walked in His Head," Patrick Segal's road to wholeness and happiness through confinement in a wheelchair. And Norman Cousins' "Anatomy of an Illness" is becoming a classic on the subject of joy through the disease process.

"I think people like us feel special because we have a greater appreciation of life," adds Donna Du Brow, vice president at Filmways, a major Hollywood production company. Du Brow had a heart attack a year ago at age 36 despite the fact that she jogged regularly and consumed health foods.

"My priorities have been reevaluated," she says. "Living and enjoying the relationships I have with my family and other people are much more important to me now. You stop taking a lot of things for granted."

Rose Bird, chief justice of the California Supreme Court, recently spoke on the positive effects of her breast cancer and its reoccurrence.

"In a peculiar way, death can teach you what life is all about," she told a forum recently. "It is a painful lesson and a difficult journey, but I am personally grateful that I was made to travel this path at a relatively early age. For I have learned much about myself, much about what I want out of life and much about how precious life and people are."

Even individuals who have had to adjust from fame and glory to more ordinary lives say they are pleased with the changes illness brought to their lives.

John Rudometkin, the basketball star of the early 1960s at the University of Southern California who was drafted by the New York Knicks of the National Basketball Association, developed cancer his second year in the NBA. Then 25, he was given six months to live. That was 15 years ago.

As his disease worsened, his attitude improved. Side effects of one drug left him paralyzed for about six months.

"At one point, though, an unexplainable certainty came over me and I felt I was going to be all right," he says now. "I began to feel a peace and contentment I had never experienced before . . . .

"It was the best experience of my life. It was more thrilling than walking out in the Sports Arena and having thousands of people applaud me," he says. "I learned some things I would never have learned. I feel I'm a rounder person, more sympathetic, more understanding."

The type of peace, growth and fulfillment Rudometkin and others have found through life-and-death skirmishes is also a benefit sometimes experienced by those who succumb to their illness.

"Winning the battle of living is not the point at all. We're talking about the quality of one's life while people are still alive," says Dr. Ronald Mann, a Beverly Hills clinical psychologist who works with children and adults facing life-threatening diseases.

"When we realize we're not going to be here forever, it often propels us to live in the moment because we want to make the most of what we've got. And so rather than becoming lazy, letting things slide, saying, 'Well, it really doesn't matter whether I say I love you because it's not a big deal,' knowing that maybe I won't see you again makes a big difference."

Such a difference that Mann has found that dying people can be inspirations for the living.

"If we can see someone who's dying and who has a quality of joy and a capacity for love and enthusiasm that we don't, and we don't have an imminent death upon us, we begin to wonder what's going on? How come this person who's about to die is living with such magnificence? Their being uplifts us."