A young Silver Spring couple, facing possible jail terms for convictions of drug possession, swallowed lethal doses of potassium cyanide and immediately went into violent convulsions yesterday before a shocked Montgomery County circuit court judge and a small group of lawyers and relatives.

William Duggan Melton, 27, an unemployed handyman, and his wife, 21-year-old Tracey Graves Melton, a Food and Drug Administration clerk, were pronounced dead at Shady Grove Adventist Hospital, one hour after the 10:20 incident that horrified witnesses and judicial staffers in the tranquil county courthouse in Rockville.

"The judge was saying something about the defendant [Melton] needing a more structured environment. Then Melton reached into the left pocket of his sports jacket, pulled out a white substance, put it in his mouth and took a drink of water from a glass on the table," said law clerk Steven Levine, a witness to the tragedy in the courtroom of Judge Stanley Frosh.

"I saw him do it twice," Levine went on. "Within five seconds he was hyperventilating. The judge and defense attorney were still talking. Then the breathing got so loud everybody noticed."

An instant later, Melton, who along with his wife, had carried a cloth-bound Bible into the courtroom, slumped into his chair and sheriff's deputies rushed over and laid him on the floor. Witnesses said Melton's wife, who was sitting in the first row of seats with her mother and other relatives in the audience section of the courtroom 10, then walked over to her husband and patted him softly on the head.

"The deputies were working on the defendant when she sat down at the table," Levine recalled. "I noticed something in her lap, some kind of white crystal, and saw her put it into her mouth. The deputy tried to grab it out of her mouth, but it was too late."

Blood seeped from Tracey Melton's tongue and lips and she, like her husband, began writhing uncontrollably.

"It was crazy," said court clerk Howard Smith. "It was as if they were going to the gas chamber or something."

"The tradegy," said Melton's attorney, Maurice Beggiani, "is that all of us were too late to undo the damage of years of drug abuse."

The Melton's story, as pieced together by interviewers yesterday with friends, relatives and fellow workers contains all the character and human ingredients of extremely troubled lives in the suburbs of Washington.

William Melton, known as Doug by his friends, graduated from Rockville's Perry High School in 1971, where he was active in wrestling and drama productions.

He enrolled for a few semesters at Montgomery County College, where he pursued an interest in commercial art. Three years ago he journeyed to Arizona and lived for a short time with a group of other young people involved in an alternative lifestyle. There he was injured severely in an auto accident, and suffered serious back and neck pains that required medication.

According to friends, Melton began using drugs in junior high school -- LSD, mescaline and marijuana -- and continued experimenting with drugs up until yesterday's tradegy. He worked at a number of odd jobs around the Washington area. Then last year, he got a job as a keypunch operator at a branch of HEW where he met Tracey Graves.

Graves graduated from Einstein High School in 1977.According to one person close to the family, she had been an alcoholic since she was 13, and by the time she was 16, developed a dependency on hashish and marijuana as well. Since February 1977, Graves had worked for the Food and Drug Administration in Montgomery.

Early this year Melton was fired from his HEW job because, one source said, he had grown to close to Graves on the job. In the meantime Graves had moved out of her home and lived with Melton in his white model van.

Then, one night late in March, police received an assault-in-progress call from a witness on Viers Mill Road in Wheaton. When police arrived at a white van outside Viers Mill Baptist Church, they heard a girl screaming into a CB microphone and saw a man with red paint on his forehead and a red rope around his neck. The words, "Satan Be Banished, Burn in Hell," were scrawled on his face.

During the investigation police found marijuana, cocaine and a six-foot African spear in the van. Melton and Graves, who insisted that they were merely playing, were arrested and charged with drug possession. They were convicted of the charges in August. Two months before the trial, they were married.

"The first time I saw Doug Melton I knew he was way, way out," said John Bayles, assistant pastor of Wheaton's Halpine Baptist Church, which the Meltons attended after their marriage.

"He was a very oppressed person, but he and his wife had changed. They found Christ and wanted to start all over," Bayles said. "She was a very quiet type. Hung on every word Melton said. Very devoted. The greatest fear they both had was this sentencing coming up. They didn't want to go to jail."

Mildred Peters, resident manager of the apartment building on Hewitt Avenue in Silver Spring the Meltons lived in since August, rememberd them as a quiet couple.

"Oh my God," she said, when told of the double suicide. "No, the only thing I can recall is that he used to come down and preach to me. Fire and brimstone."

Begianni, the defense attorney, said he assured the couple that neither of them would go to jail, and that the judge would probably recommend probation for Tracey Melton and, at worst, a short term at a pre-release camp for William Melton. Despite the assurances, and others by psychological diagnostic workers who worked with the Meltons after their conviction, the couple was apparently still terrified of returning to court.

Finally, yesteday, the sentencing day came. For a half hour both sides rendered final argumments and then Judge Frosh asked Melton if he had any words to add.

Levine remembered Melton saying he had found Christ, was now a religious man, and wanted only to spread His word and work with young people suffering from drug abuse. Frosh then advised that Melton needed more structured environment, such as a pre-release camp. It was then that Melton reached into the jacket pocket of his two piece suit and swallowed the cyanide.

"Certainly, their lives were very troubled, very strained," Bayles added yesterday. "But it was obvious that they loved each other a great deal and there was real hope they would see everything through."

"There was just this deep psychological scar," Beggiani said. "There was too much to undo, and too little time."

There was no indication yesterday where the Meltons got the cyanide. An FDA spokesman said the division in which Tracey Melton worked was administrative only, and no drugs could have been obtained there.

Reached yesterday at her parents home in Kensington, a woman identifying herself as Tracey Melton's sister declined to comment.

"Please leave us alone," she said.