Often, Alan Ball dreams about his sister.

Sometimes she is young and beautiful, as just before she died on her 22nd birthday in a car accident. Sometimes she is wise and gives sage advice. Sometimes she is old and fat, and has bad hair.

Mary Ann Ball, at the wheel of the car, was instantly killed when she turned onto a blind curve and hit an oncoming car. The writer and director, then 13, was in the passenger seat. For him, the trauma of watching his closest sibling die became a defining experience, the great divide that separated everything that came before from everything that followed.

But Ball, now 45, never wrote about it, even though he became a successful Hollywood writer, creator of the Best Picture winner "American Beauty." Not until he agreed to create an unlikely show about death for HBO, "Six Feet Under," a fanatically followed series about a family of Los Angeles undertakers, the Fishers: siblings Nate, David and Claire, and their mother, Ruth. The series ends its second season next Sunday night; new episodes won't appear until next spring.

Much about "Six Feet Under" is personal to Ball, starting from the first episode, in which Nathaniel Fisher, the father, is killed in a car crash on his way to pick up the eldest son, Nate, from the airport. In much the way that Mary Ann Ball remains present in her brother's life, the father reappears to his family members from time to time -- cigarette dangling, eyebrow arched -- offering advice, support or, just as often, a sarcastic gibe.

Writing the show "has forced me to face death on a daily basis," Ball says, sitting behind his desk in a darkened office on an old production lot in deep Hollywood. The season is nearly over and the staff of writers has gone, the actors scattered to the winds. Only the editors and Ball's assistant are around.

"The show is about the loss I've felt in my life," Ball says. "The grief I've felt over loss, the people I've lost, situations [lost] that I'd nurtured." He rocks back in his metal chair and puts his feet on the desk. He has dark hair, pale skin -- a round baby face with a goatee and a laugh that erupts unexpectedly, in great huffing guffaws. "It's about moving on. About greeting grief, and being able to move past it."

The production lot is a dreary concrete complex on a forgotten street off Sunset Boulevard, the kind of place where work gets done. Ball's office is chrome cool, with retro industrial furniture. His dim inner sanctum has an urn for human ashes and an unopened bottle of Jack Daniel's, the latter a gift from the distiller after the whiskey appeared in an episode. There's a mock-up of the four main actors photographed for the cover of Newsweek a couple of months back (cover line: "Why We Dig Six Feet Under"; the story got bumped for breaking news). Another wall has a framed rave review of the show by Washington Post critic Tom Shales, adjacent to crushed rose petals hanging in a massive frame, a souvenir from "American Beauty."

That movie came out three years ago, about the time that an HBO executive, at lunch with Ball, dangled the concept of the show: a series about undertakers. The executive, Carolyn Strauss, had offered it to other writers, but Ball was the only one to really respond. Immediately he liked the idea. He recalls wondering: "What must it be like to live with death? Your job is to face death for the rest of us. To look at the body. Undertakers are ghouls, freaks, monsters. I chose to view them as heroic. They are doing what the rest of us are afraid of."

But the exercise quickly became more than mere existential or even corporeal curiosity. Unconsciously Ball wove the pain and experience of his own loss into the human fabric of the Fisher family, four people in a rambling, slightly worn house in Los Angeles where the dead bodies go on display in the living room. He delved into areas of his psyche that he hadn't dared touch. The process became not just one of artistic creation but also, somehow, of personal healing.

"What grief can do for us is teach us that the ability to feel tremendous pain increases our capacity to feel joy," he says. "You can't just have it one way. Life is filled with both. If you really drop your guard, if you fully love something or someone, you'll lose them eventually, or die first."

The Unlikely Undertaking

Despite the intensely personal nature of the show, or more likely because of it, "Six Feet Under" has struck a quiet chord among audiences. On average, HBO says, 4 million households watch the show, numbers comparable to those enjoyed by the pay-cable channel's "Sex and the City." From the start, critics applauded Ball's empathetic treatment of unusual subject matter; the show garnered Golden Globe and Directors Guild of America awards after its first season.

Fans conduct heated Internet discussions about the characters, and the show's success has changed the lives of its stars, such as the hitherto little-known Frances Conroy, who plays Ruth, the pre-feminist mother coping with life on her own, and Lauren Ambrose, who plays Claire, the oddball teenager who drives an old hearse to school.

"It's amazing, there's such a broad cross-section of people who are watching the show," says Conroy, a longtime stage actress who finds herself greeted on the street by strangers, like two women in their forties who approached her in the supermarket recently. "One said, 'I don't want to bother you, but I just love Ruth. I think she's a wonderful character.' "

Conroy is flattered, though not that surprised. "I think she brings to mind many moms that I've known," she says of her character. "Alan said in a couple of discussions that he didn't want the mother to be some glamorous, made-up gal that no one would think is a human being.

"Even the way she dresses -- it's simple. You can almost forget it at some point. So other women can watch her and say, 'Yes, I've said that to my children.' She's going through situations that other women go through."

Ball shows interest in every aspect of his main characters, from Ruth's renascent sexuality to the undertaker Federico's looming mortgage problems. The show frequently presents people and situations rarely treated in the universe of television. David Fisher (played by Michael C. Hall) is gay, recently out of the closet -- and a devoted churchgoer. His boyfriend is an African American cop, praised by minority advocates as probably the first sympathetic gay black character on TV. There is an immigrant Russian love interest for Ruth, along with a well-adjusted hooker who visits Brenda (Nate's girlfriend, played by Rachel Griffiths) to receive her weekly massage. Ball depicts recreational drug use, casually noted, and drug use that turns out to be very dangerous.

Meanwhile, the weekly funerals at Fisher & Sons explore the diversity of multicultural Los Angeles -- from a Buddhist ceremony complete with monks (some authentic) to a Jewish shiva service to a wake for a Hell's Angel -- moments that are often oddly comic.

Some critics have derided Ball's vision of the world as a cynical one, in which desperate people fail themselves and their loved ones: Brenda cheats on Nate; Nate ends up fathering a child after cheating on Brenda. It's a criticism that surfaced before with "American Beauty," a tale of pain and dysfunction beneath the surface of suburban life, told through the eyes of a dead man.

Ball is not averse to being labeled a cynic. "It's hard to have a brain in your head, keep your eyes open to the culture, and not be cynical," he says, inserting one of his sudden bursts of laughter. "People who are the most cynical are the most romantic at heart. That's definitely true of me."

He goes on for a moment about Enron, about "institutional hypocrisy," about politics, before circling back to his show. "I'm completely not cynical about the characters in the show. I believe in them as thinking beings struggling to find meaning in their lives. Failing sometimes. Succeeding sometimes.

"What's necessary, what's important, is not failing or succeeding, it's the struggle that's important. Our culture is so much about success, which I think is very -- very -- shallow. You learn more from failure."

And if Ball himself won't deny the charge of cynicism, Peter Krause, who plays Nate, will do it for him. "There's forgiveness in Alan Ball's world," says the actor, who has long discussions with the writer before shooting a scene (a notable change from Krause's previous starring role on "Sports Night," when executive producer Aaron Sorkin often sent the script an hour before the shoot). "There's apprehension, trepidation, guilt. People who run away from things, people who face up. There are people who are comfortable saying ['expletive expletive expletive'], and people like Ruth who say, 'Mind your language.'

"I don't see the cynicism. I see this great cross section of American life. When I see what goes on around me in my life, it's a pretty accurate cross section."

Achieving Emotional Well-Being

Most families seem normal from the outside. Ball's family seemed normal, too. His father was a quality control manager for Lockheed Aircraft in Marietta, Ga., an Atlanta suburb. But what he'd really wanted to be was a carpenter. He'd tried to make a living at it and failed, and, Ball says, "he never recovered from that." The writer's mother was a housewife, a traditional one, who had three kids and then a fourth -- surprise -- at 44.

So Ball, the youngest, barely knew his brothers, about 20 years his senior. His best friend was his sister, and when she died he felt he had lost everything. His parents descended into depression, retreating into their own worlds of grief and apocalyptic religion.

There were other losses, more subtle ones, no less vivid for their banality. Ball's neighborhood was targeted for the building of an interstate highway, and the woods where he played as a young child were covered in blacktop. The neighbors' homes were bulldozed.

"I remember the neighbors moving away," he says. "I remember very clearly the woods where I used to play. I drive by . . . now when I visit my mother, and I still feel a tinge of sadness. There's a sense of grief, of losing where you live."

Six years after Mary Ann's accident, Ball's father died. "It wasn't so much that I was unhappy," Ball explains. "I was painfully aware of the ephemeral nature of life. No matter what you have, you can lose it in an instant, without warning. What that did for me for many, many years was, it kept me from committing to anything. It kept me from committing to myself, even, from really fully taking risks emotionally. From going after things."

And there was another thing. Ball suspected that he was gay -- he remembers his reaction to seeing Sean Connery in a James Bond film at age 8 -- and instinctively knew that it would cause problems in his family. So he suppressed that, too. "It was terrifying to me," he says. "I was born in 1957 in a small town; I didn't grow up watching 'Will & Grace.' " The idea of being gay "threatened something in me. I knew it was something I couldn't let anybody know."

Instead he became an overachiever in school, and set his sights on being an actor. At age 6 he'd already written a play, and he constantly directed the kids in the neighborhood in little productions. But it wasn't until his twenties -- after he attended Florida State University -- that he realized his calling was not acting but writing.

Ball moved to New York, wrote some plays and got one optioned for the movies. He moved out to Hollywood and set his sights on success. And he did succeed, writing and producing for the sitcoms "Grace Under Fire" and "Cybill."

He hated it. "When I came out here and began working for sitcoms, I felt to some degree I'd sold out," he says. "I had to write 'American Beauty.' If I hadn't written it I'd be a total whore, I'd lose my passionate connection to my work."

That story, which Ball marks as the start of his slowly facing up to himself, came right from the gut. " 'American Beauty' is about a man who was shut down. Who had given up. Who doesn't really have any passion for his own life," he says, and in saying this his voice sounds strikingly like Kevin Spacey's, who played the character, Lester Burnham. In the film, he continues, "that changes. That's been something that's been happening to me, both artistically and in life in general."

Part of that process was coming out of the closet, which didn't happen until Ball was 33, not unlike the character of David in "Six Feet Under." Even then, living in diverse, hedonistic Los Angeles, it was not easy. When Ball told his mother, she placed her head in her hands and wailed: "Oh! God has dealt me some blows in my life."

Ball laughs at this now -- he says he laughed then, too, at the melodrama, but the moment made him want to cry. Still, his mother eventually accepted his sexuality, and Ball says that "coming out of the closet was the biggest step I ever took toward emotional well-being. I've never regretted it. I'm a much more integrated person."

After "American Beauty" sold, life still had some lessons for Ball. He had two years left on a television writing contract, and had pitched and sold a comedy series for ABC called "Oh Grow Up." It was about three guys sharing a Berkeley brownstone, two of them straight, one of them gay. Their dog, when it barked, had subtitles. It lasted 11 episodes and was an unmitigated disaster. It also happened to air at the very same time that "American Beauty" was in theaters.

The show "was not at all what I intended when I pitched it," he protests. "But you talk yourself into believing it's good. Otherwise how do you justify going to work every day? I hypnotized myself into thinking it was good." He pauses a beat. "It was doomed. It was a great, great lesson in balance."

It's taken some years, but Ball has finally found a certain balance in his life. He's found a vehicle to explore the terrain that interests him most: human emotion, human striving and failure. "I don't have a choice. Writing about other stuff," he says, bores him.

And he's found, for the very first time, a meaningful love relationship to balance out the career. For nine months Ball has been with an actor (whom he declines to name) who he thinks is "the one." He says it's his first significant relationship since childhood.

And it's no coincidence, he believes, that all this has happened at once: the recognition, the ability to love, the intensive probing and healing. It's all connected.

He is reminded of a song by Tom Waits in which the singer says, "If I chase away my devils, my angels may leave too." Ball says: "This whole Puritan notion -- be pure, be clean, strive for perfection -- it really encourages us to deny what's human about us. Only if we forgive our own shortcomings can we forgive others."

He thinks a moment. "Up to recently, my work has been the main source of meaning in my life," he says. "When you lose someone you love, you think, 'I can't ever love anybody that much again.' "

"But you can. And not only can you, you have to, otherwise -- " He hesitates, reluctant to complete the thought.

Otherwise, you're not alive?

"Yeah," he says. "It's what I was thinking."

"It's about moving on. About greeting grief, and being able to move past it," says Alan Ball of the hit HBO series "Six Feet Under."Frances Conroy, Richard Jenkins, Lauren Ambrose, Peter Krause and Michael C. Hall as the troubled family of undertakers in "Six Feet Under." Below, Alan Ball after winning the Best Original Screenplay Oscar in 2000 for "American Beauty."