A longtime accountant for the Montgomery County school system has confessed to embezzling nearly $1.2 million, which he said he used for investments, including a 10-acre farm and gold coins, as a hedge against skyrocketing medical bills for his dying wife, county authorities said yesterday.

Stevenson P. Bryan, 52, of 8203 Old Line Ct. in Frederick, Md., voluntarily turned himself in to the state's attorney's office Wednesday, bringing with him documents detailing the scheme and surrendering his assets, according to the county's chief prosecutor and school superintendent.

That night Bryan, whom officials described as "deeply depressed" and "suicidal," was admitted to Suburban Hospital in Bethesda. Hospital officials last night would not release any information on Bryan's condition.

In back-to-back press conferences yesterday, Montgomery County State's Attorney Andrew L. Sonner and School Superintendent Wilmer S. Cody both emphasized the stress under which Bryan undertook the scheme.

"It appears he's a typical Bob Cratchit, working away, taking care of his two children and his dying wife," Sonner said. Bryan's wife died recently after a long battle with multiple sclerosis, Sonner said.

Cody said it appeared that at one point Bryan, a 21-year employe of the Montgomery school system whose annual salary was $38,958, had attempted to return some of the money to the school system account. The assets turned over Wednesday -- including the deed to a $216,000 farm in Frederick, a Chrysler LeBaron and a Lincoln Continental, $600,000 in antique gold coins and $140,000 in cash -- totaled nearly $1 million.

Sonner said that Bryan never lived on the farm, residing instead in a modest subdivision with his wife and two teen-age sons. Sonner said he kept 909 "Double Eagle" gold coins in three large ammunition boxes under his bed and drove the two cars a total of 1,300 miles.

Sonner said Bryan will be charged with one count of embezzlement, which could carry a maximum sentence of 15 years.

But Sonner added a stiff sentence was unlikely. "We consider ourselves hard-boiled prosecutors, but this is a most tragic case, and I think it touched strings of mercy we don't usually feel for white-collar embezzlers."

Bryan's attorney, Arthur B. Brisker of Rockville, declined to comment on the details of the case, saying only, "The state's attorney has observed very accurately: This is a very tragic case."

The funds were diverted sporadically beginning in 1979 and ending in 1983. Cody said Bryan had used blank checks "which should have been destroyed" to order reimbursement payments to the nonexistent Montgomery Medical Technical Laboratory, for which Bryan had set up accounts at the Farmers and Mechanics National Bank and the Fredericktown Bank and Trust Co.

In preparing the checks, Cody said Bryan had to forge as many as three signatures on each. "Then when the canceled checks came back, he was the one who checked them off."

Cody said Bryan's admission apparently was triggered by a routine internal audit undertaken several months ago by the Department of Education's accounting staff. When asked for the benefit plan's records for 1983, Cody said Bryan "stalled." Last Friday, Cody said Bryan was ordered to produce specific canceled checks pertaining to the account. On the advice of his attorney, Bryan instead took the checks to the state's attorney's office and offered to cooperate in returning the funds.

Although an estimated $200,000 is still unaccounted for, Cody said the benefits plan is bonded against employe fraud; the plan's investments pay out an average of $20 million a year.

Cody said two previous audits, in 1981 and 1982, had failed to uncover the scheme. In addition to the ongoing internal audit, Cody said the Washington firm of Peat, Marwick, Mitchell and Co. would undertake an independent audit "to examine the procedures throughout the system to make sure this can't happen again."

Sonner said that Bryan had reported on his tax returns any interest that accrued from the investments he made with the embezzled money.