John M. Fedders, the chief enforcement officer at the Securities and Exchange Commission, resigned yesterday after public revelations that he had beaten his wife periodically during their 18-year marriage.

In his letter of resignation to SEC Chairman John S.R. Shad, the 43-year-old Fedders admitted that "on seven occasions" marital disputes with his wife Charlotte had "resulted in violence." But he said newspaper accounts of the marriage and his divorce trial, which opened in Montgomery County Circuit Court on Feb. 4, had "exaggerated" what he described as "occasional highly regrettable episodes during our marriage."

Fedders said in his letter he was confident his personal problems had not interfered with his handling of his job. He decided to resign from the $72,300-a-year post, his letter said, because "the glare of publicity on my private life threatens to undermine" the effectiveness of the SEC's enforcement division.

Shad accepted Fedders' resignation "with regret," and noted in a letter to him that Fedders had taken the job "at great sacrifice, both financially and in terms of your personal privacy." He said Fedders had provided "exceptional leadership" in his division and had placed his "professional responsibilities above all others."

Anson Franklin, a White House spokesman, said the White House would have no immediate comment on the resignation. Earlier yesterday White House spokesman Larry Speakes said President Reagan had read accounts of Fedders' problems but would take no action against him while the divorce trial was pending. On Monday the trial was postponed for three months.

The periodic wife-beating that contributed to the separation of the Fedderses in 1983 first became public in court testimony from Charlotte Fedders. Earlier this week The Wall Street Journal published a lengthy front-page story, followed yesterday by stories in The Washington Post, that recounted her descriptions of how the 6-foot-10 Fedders had abused her. The Journal and Post stories also reported about his role as an outside lawyer for Southland Corp., owner of the 7-Eleven chain, during a time when the company was accused of covering up a bribery scheme.

In addition, the stories described financial difficulties that arose for Fedders when he left a $160,000-a-year job as a partner at the Arnold & Porter law firm to join the SEC, where he originally earned $59,500. According to court testimony, his wife said the couple had an agreement that he would stay in government work only until January of this year and would try to use the so-called "revolving door" out of the SEC to a more lucrative job in the private sector.

It was these articles that Fedders said "unfairly described" incidents in his marriage.

Hal Witt, Fedders' attorney, said yesterday that Fedders is undergoing psychotherapy and hopes to mend his marriage.

Charlotte Fedders, 41, who has been in therapy for several years, said in an interview earlier this week that she is doubtful about a reconciliation.

She said she received word of her husband's resignation from her lawyer yesterday evening.

"The whole situation is very sad," she said. "I didn't expect it. Some people might think I'm glad, but I'm not. I feel very sad for him."

In her court testimony, Charlotte Fedders, who is more than a foot shorter than her husband, said her husband had physically and emotionally abused her, including beating her on the abdomen while she was pregnant with their first son and yanking her by the hair over a banister in their house. Court records include photographs of her with a black eye and a badly bruised hip.

Charlotte Fedders described in her testimony periods of weeks when her husband would not talk to her or anyone in the family. In 1978, she testified, during one of these "silent" periods, Fedders handed her a note with the name of a lawyer and said he wanted a divorce. When she pleaded with him not to divorce her, she testified, he laughed and said he had "been dating for years."

The couple has five sons ranging in age from 4 to 16. Another infant son died suddenly of spinal meningitis in 1977.

Although Fedders' story only became public recently, some staff members in Congress and in the White House were apprised of allegations of his episodic wife-beating as long as a year ago.

After listening to President Reagan promise a crusade against spousal abuse in his State of the Union address last year, Charlotte Fedders composed a three-page typed letter to the president that described how she had incurred "a broken ear drum, wrenched neck, several black eyes, and many, many bruises" from her husband's beatings.

Fedders never sent the letter, but one of her sisters, trying to draw attention to her case, called White House counsel Fred Fielding and later delivered the letter to his office.

Rumors about abuse in the Fedderses' marriage also surfaced on Capitol Hill last year.

"Under what grounds could we open it up to the public ?" said one congressional staff member who asked not to be identified, and who said he learned of Fedders' problems last year. "What people do in private is their business, whether they are beating their wives or are homosexuals, unless it affects their work. He is a very competent guy."

The lack of action against Fedders -- or even public discussion of his situation -- reflects the difficulty that exists in applying moral standards to federal officials who are doing their jobs well. This is particularly so in the case of Fedders, whose appointment did not require congressional approval and whose job performance, according to sources familiar with his work, apparently did not suffer.

In his position at the SEC, Fedders supervised the 200 lawyers, accountants and investigators who police the U.S. securities markets.

In his letter to Fedders last night, SEC Chairman Shad said Fedders increased the annual volume of enforcement actions by 50 percent, despite a decrease in personnel.

Under Fedders, the SEC's enforcement division concentrated on cases involving financial fraud and insider trading -- the use of confidential information by corporate executives in the stock market.

Fedders is credited with beginning to crack the traditional secrecy of Swiss banks through innovative cooperation with the Swiss government. Fedders fostered a concept known as waiver-by-conduct, which requires foreign investors dealing in U.S. markets to play by the same rules without hiding behind secrecy laws.

Former colleagues variously termed Fedders' work at the commission as "outstanding, professional, aggressive."

"It remains my judgment that John Shad's best decision was in selecting John Fedders," said Bevis Longstreth, a former commissioner who worked closely with Fedders before resigning last year. "The problem is this other tragic aspect, but nobody knew about it."

He said Fedders had brought a sense of organization and discipline to the enforcement division that was "badly needed, that had been missing for some years under Fedders' predecessor Stanley Sporkin. He did not try to push the power of the agency beyond its limits, but used it with wisdom, not excess."

Douglas Scarff, a Washington lawyer, headed the SEC's market regulation division when Fedders was enforcement chief. "He inspired staff people to greater efforts," Scarff said.

While Fedders' professional successes are widely known, the revelations about his spousal abuse came as a shock to many of those who knew and worked with him.

"It's a tragedy for him and his family," said a Senate Banking Committee staff aide who knows Fedders. "I never knew anything about it. I would hope he is going to seek help and get his life in order."

Early yesterday, one women's group called on Reagan to fire Fedders, but other women's leaders felt that ousting him would do little to solve the widespread problem of spousal abuse.

"If we start firing all the men who beat their wives, the unemployment rate is going to skyrocket," said Nancy King, deputy director of the Center for Women Policy Studies, which publishes a quarterly journal on wife and child abuse.

Some of those asked about this case said they were surprised to learn that spousal abuse exists among middle and upper classes.

"Family violence cuts across all classes and across all races," said Lois Haight Herrington, an assistant attorney general who served on the Attorney General's Task Force on Family Violence in 1983 and 1984. "It's not a Bowery image as people have thought. It happens in the very 'best' of homes."

In the Fedders case, court documents detail incidents of abuse throughout the marriage and also the struggle of a family trying to maintain an affluent life style on a salary that had plummeted. Court records show that the couple hoped Fedders' four-year stint with the Reagan administration would enable him to return to private law practice with a salary of about $250,000.

Since taking the SEC job, the Fedderses borrowed heavily against a $150,000 line of credit at the Madison National Bank. But after Fedders had borrowed $40,000, and following disclosures that Fedders' role with Southland Corp. was under investigation, the bank stopped further loans.

Despite years of unhappiness in their marriage and the financial sacrifices of Fedders' taking a job at the SEC, Charlotte Fedders hoped the move would ultimately help repair their relationship.

"Mr. Reagan, when John took the SEC post, we had little savings and we knew that this job would put a tremendous strain on us financially," she wrote in her letter to Reagan dated Jan. 26, 1984. "But I felt this was the 'break' John was looking for to finally make him happy and relaxed."