Due to an editing error, an article Tuesday about the suicide of former San Francisco supervisor Dan White described "The Times of Harvey Milk" as a television documentary. It is an Academy Award-winning film documentary.

Dan White, the former San Francisco supervisor who spent five years in prison for killing that city's mayor and its first openly gay supervisor, committed suicide today at his San Francisco home, city officials said.

White, a 39-year-old former firefighter and police officer, became the center of political and legal controversy -- and triggered one all-night riot -- when he shot Mayor George Moscone and Supervisor Harvey Milk to death on Nov. 27, 1978.

He was charged with first-degree murder but convicted in May 1979 of voluntary manslaughter after arguing that political pressure and a diet of sugar-rich "junk foods" had made him emotionally unstable. The so-called "Twinkie defense" was later banned by the state legislature.

Police said White apparently died of carbon monoxide poisoning at his home in the Excelsior district of southeast San Francisco.

A police spokeswoman said White's brother found the body and called police at 1:52 p.m. PDT. A City Hall official said White was found in his car, a yellow Buick Le Sabre, with the engine running and a garden hose stretched from the exhaust pipe into an almost-closed car window stuffed with towels.

Police Chief Cornelius Murphy said White left three notes: one to his brother, Tom, whom White had invited to the house; one to his wife, Mary Ann, a part-time teacher, and one to his mother.

The notes reportedly expressed concern over the anguish his family would feel at his death but did not mention Moscone or Milk. White is survived by three children.

Supervisor Quentin Kopp, the first to reveal White's death, said, "I am not surprised, given the stigma of trying to return to your home town and live with the . . . deaths. It's a sad end to a sorry story."

White lived quietly after returning to San Francisco in January from a year's parole in Los Angeles, occasionally turning up at baseball games and other public places.

Some local observers, such as newspaper columnist Herb Caen, said they thought he was taking unusual risks to return to the city, where many members of the large gay community were still outraged and threats continued against his life.

"Well, I felt his life would inevitably come to an end prematurely . . . . I'm certainly relieved that he took his own life rather than have someone else take his life," said Robert Epstein, director of the television documentary, "The Times of Harvey Milk."

The two murders sharply altered San Francisco politics.

Board of Supervisors President Dianne Feinstein, whose previous failure to win the mayor's spot had apparently capped her political career, automatically suceeded Moscone and became one of the city's most successful mayors and a strong candidate last year to be the Democrats' vice-presidential candidate.

The "White Night" riot that followed the lesser verdict unified the city's homosexual community as never before. Harry Britt, also an avowed homosexual, was appointed to Milk's seat and later reelected.

White had served a year as supervisor without distinction when he resigned in 1978 on grounds that the $9,600 annual salary would not support his wife and infant son.

The resignation threatened a 6-to-5 conservative majority on the nonpartisan board, and supporters such as the police officers' association persuaded White to ask Moscone to reappoint him.

Milk, a liberal and a standard-bearer for increasingly powerful gay groups, urged Moscone to pick someone else, and the mayor turned White down.

On the Monday morning that Moscone was to announce his successor, White entered City Hall through a basement window, avoiding a front-door metal detector that would have revealed his .38 cal. handgun. When he appeared at Moscone's office, the mayor invited him in to talk, and White shot him three times, the last slug fired point-blank into the mayor's head.

White reloaded, walked calmly out of the mayor's office and down a long hall into Milk's office. He killed the supervisor with four shots, the last again point-blank to the head.

In a tearful confession to a friend on the city homicide squad later that day, White said he felt that Moscone had double-crossed him.

Most of San Francisco reacted with rage and shock, but some people in White's lower-middle income, blue-collar neighborhood appeared in "Free Dan White!" T-shirts.

The trial jury, most of them white Roman Catholics like White, heard a tape recording of his emotional confession, his rantings about being under terrible pressure from supporters and opponents. They also heard psychiatric testimony that too much refined sugar can cause depression and that White might have acted irrationally in part because he had been eating large amounts of junk food.

The judge imposed the maximum sentence of seven years and eight months for voluntary manslaughter, and news accounts noted that the law required his release after two-thirds of his sentence if he behaved well.

Within hours, more than 5,000 people, many of them homosexuals, were marching on the city streets. Windows were smashed, police cars burned and about 150 people injured.

White spent nearly all of his sentence at Soledad prison, 100 miles south of San Francisco, in a protective wing that still houses Sirhan Sirhan, assassin of Sen. Robert F. Kennedy. Prison officials said he sought no pyschiatric counseling; friends said he indicated no remorse in his letters and kept up a steady diet of sweets. His second child, a retarded son, was conceived during a conjugal visit there.

Paroled in January 1984, White lived in an apartment in Los Angeles' San Fernando valley; officials here complained about his presence, and San Francisco officials warned that he should never return home. His parole ended Jan. 6.

Feinstein, who had expressed concern for White's safety, said today: "I am very sorry to hear that Dan White has taken his life. This latest tragedy should close a very sad chapter in this city's history."

Scott Smith, Milk's lover and business partner, said he was "stunned" by White's death but not upset. "He got away with murder," Smith said. "I suppose what goes around comes around."

Douglas Schmidt, White's attorney, said he last spoke to White three weeks ago and found him suffering from "all-encompassing" depression: "He didn't understand his own illness and couldn't deal with the fact that he'd killed two men.

"He was not an amoral person," Schmidt said. "His entire background was antagonistic to what he did. That was the seed of his defense. Everybody pooh-poohed it, but he was a sick man."