John W. Hinckley Jr., accused in the attempted assassination of President Reagan, "desperately" needs psychiatric treatment in the wake of two suicide attempts and should be transferred to St. Elizabeths Hospital for the mentally ill, Hinckley's defense lawyers have contended.

In papers filed in U.S. District Court, a defense psychiatrist said Hinckley, who tried to hang himself Nov. 15, is a "permanent suicidal risk" and has been depressed most of the time since he was arrested last March 30 and charged with shooting Reagan and three other persons.

"At any time the gravity of his situation can come home to him, possibly on the subtlest of cues, resulting in a new bout of despair and suicidal intent," Dr. Thomas C. Goldman said in a letter to defense lawyers that was filed with the court Monday. Hinckley is in solitary confinement at the stockade at Fort Meade, Md.

Defense lawyers, relying on the Constitution's protections against cruel and unusual punishment, urged Judge Barrington D. Parker to transfer Hinckley from Fort Meade to St. Elizabeths here, where he could receive psychiatric treatment and be supervised by persons trained in suicide prevention.

Government prosecutors, citing safety and security concerns at St. Elizabeths, suggested in court papers that Hinckley instead be transferred to the federal correctional institution at Butner, N.C., where he underwent extensive psychiatric examination last summer.

The U.S. Marshals Service, which has custody of Hinckley, contends that security at St. Elizabeths is inadequate, prosecutors said in court papers.

Hinckley's lawyers, who had conceeded that their client shot Reagan and the others, will contend at his trial that Hinckley was insane at the time and should not be held criminally responsible for his acts.

Their request that Parker commit Hinckley to St. Elizabeths for treatment of what they described as his "underlying mental disorder" raised prosecution concerns that the defense is trying to get a pretrial decision from the court that Hinckley has a serious mental illness. Hinckley's trial is scheduled to begin Jan. 4.

The government said it does not oppose psychiatric counseling in the case, but would object to an early determination of the broader issue, to be resolved at trial, as to whether Hinckley suffers from a serious mental disorder.

Parker has scheduled a hearing on the defense request for 9:30 a.m. today.

Hinckley was returned to the Army stockade at Fort Meade from the base hospital last Saturday after recuperating for a week from a suicide attempt in which he used a makeshift noose to hang himself from the bars of his cell window.

An earlier apparent suicide attempt involved an overdose of an aspirin substitute while he was being held at Butner.

Dr. David Bear, a defense psychiatrist who examined Hinckley Saturday, said in a letter filed with the court yesterday that he believes that Hinckley is "severely depressed" and is a high level suicide risk. His depression may be exacerbated not only by his legal problems, but by the upcoming holidays, withdrawal of certain medicine and the "anniversary of significant events," which the psychiatrist did not describe.

Bear recommended, among other things, that sharp objects in Hinckley's cubicle at the stockade be padded and that he be given ear plugs and a mask to help him sleep. Hinckley's cubicle is lighted 24 hours a day for ease of surveillance.