John W. Hinckley sees himself as an "errant child" who feels he has done "something bad, not terribly, not unspeakably awful . . . for which he's sorry now and feels he ought to be forgiven," a defense psychiatrist testified yesterday.

Dr. Thomas C. Goldman, who has conducted 48 hours of interviews with Hinckley since he shot President Reagan, told the jury that Hinckley has shown a "childish relief" since he was locked up and has no appreciation "that this is a grown-up world and a very grown-up crime that he committed."

Goldman told the jury he is not sure that Hinckley is "willing to take punishment" for what he has done.

Goldman is the fourth defense expert to testify at the trial, now entering its fourth week. Hinckley claims that he was legally insane when he wounded Reagan, White House press secretary James Brady, U.S. Secret Service agent Timothy McCarthy and D.C. police officer Thomas K. Delahanty March 30, 1981, outside the Washington Hilton Hotel.

While Reagan and McCarthy recovered completely from their wounds, Delahanty retired on disability from the police force and Brady, who was shot in the head, suffered lasting injuries.

"There is no sense in talking to him Hinckley of a real appreciation of the magnitude, of the seriousness of the crime," Goldman testified. Hinckley, whom Goldman described as a socially isolated "boy assassin," is now "glad to be back in contact with authority, family, society . . . feeling as though he hadn't done anything all that terrible."

As Goldman testified, Hinckley's face reddened and he removed the brown clip-on tie he was wearing and opened his shirt collar. Seated next to defense lawyer Gregory B. Craig, Hinckley became increasingly restless as Goldman repeatedly used the word "pathetic" to describe Hinckley's telephone calls to actress Jodie Foster.

During the calls, which Hinckley tape recorded in September 1980, Goldman testified twice that Hinckley sounded like "a pathetic little boy." At that point Hinckley sat back in his chair and angrily turned and whispered to Craig. Hinckley, who unexpectedly stormed out of the courtroom during Foster's videotaped testimony and has left the trial two other times with the court's permission, did not attempt to leave his seat.

Last week, Judge Barrington D. Parker Jr. warned Hinckley's lawyers that he would not be permitted to come and go from the courtroom. Yesterday, for the first time, a film camera was set up in the courtroom. It was reported that Parker ordered the equipment installed so that Hinckley could view the proceedings by closed circuit in the courthouse cell block if he left the trial again.

Goldman, who has testified as an expert psychiatric witness at more than 150 trials in the local and federal courts in Washington, told the jury yesterday that he believes Hinckley suffered from a mental disease on the day of the shooting.

Goldman, who will resume his testimony today, has not yet disclosed his diagnosis but spent yesterday afternoon discussing the "personality characteristics" in Hinckley that were the basis for his findings.

Hinckley had "envy for people who were more sexually and socially competent" than he was, Goldman testified, but at the same time had "contempt for the whole business of being macho. . . .' When he worked at a supper club, Goldman said, Hinckley "had a secret sense of satisfaction" when he watched young men at a discotheque there "making a play" for women but then being turned down.

Hinckley, who saw himself as a "totally ineffectual" adult, used the same childish approach he used with his mother when he contacted Foster, Goldman testified, adding that Hinckley "felt terrible" when Foster rebuffed him.

Rejected by the woman of his fancies, Hinckley developed "a positive distaste for sex" and adopted an identity of a "boy assassin" that he took from the movie "Taxi Driver" in which Foster played a child prostitute.

At that point, in September 1980, Goldman testified, Hinckley was "a little boy . . . with a gun and a gun carries a lot of influence . . . the only hope to be able to influence anybody." It was then, Goldman said, that Hinckley began to stalk then-President Jimmy Carter.

He said Hinckley's parents now realize they promoted an inappropriately childish relationship with their youngest son, sending him a birthday card in 1980, when Hinckley turned 25 years old, which was signed "Moo and Poo and Titter the cat." Hinckley's parents, seated in the courtroom, blushed when Goldman read the card aloud to the jury, and Hinckley, his face turned down, smiled.

In his writings, Hinckley often expressed concern that he was mentally ill but was afraid of being considered "crazy" and worried that if he saw a psychiatrist he would be locked up, Goldman said. Hinckley never disclosed his "most troublesome" thoughts to the suburban Denver psychiatrist who treated him in the months before the shooting, Goldman told the jury.

While Hinckley wrote about violent events, including one essay in which a young boy violently murders his father with a rifle, he was "not an outwardly violent person," Goldman said, but was "abnormally placid" instead.

"No one ever saw him get angry before this tragedy happened," Goldman told the jury.