President Reagan, acting defensive for the first time in his reelection campaign, today responded angrily to the indictment of Labor Secretary Raymond J. Donovan by charging that administration officials faced a "lynch atmosphere."

Confronting reporters under the wing of Air Force One soon after he landed here for a campaign speech, Reagan was asked about "the sleaze factor," as critics have referred to the array of ethics charges against various administration appointees.

"The only sleaze factor that I've seen is all of the things that have been going on in these four years, if there is one, is on the other side, with their baseless charges of accusations that have all been proven false," Reagan said heatedly.

The brief planeside news conference was arranged by White House officials to allow Reagan to comment on the Donovan indictment. But Reagan wanted to talk first about the Sept. 20 bombing of the U.S. Embassy annex in Beirut, and his anger boiled over when reporters pressed him about "lax security" at the embassy.

Reagan said he took complete responsibility for the bombing, at which two Americans and more than a score of Lebanese were killed, but he held no one accountable.

"I'm not going to deliver somebody's head up on a platter, which seems to be the request of so many when things like this happen," he said.

Reagan said "these terrorist activities have been going on worldwide" and implied that there was no way to stop them.

Reagan's defensiveness today was unusual. Throughout the campaign, he has rarely deigned to respond to criticisms by his Democratic rival, Walter F. Mondale, and has largely ducked questions from the press.

Reagan's speeches were also unusually combative today. In Corpus Christi, site of a major naval air station, Reagan contended that "our struggle to protect Central America from communist aggression was hampered by obstacles thrown in our path by the liberal leadership of the Democratic Party." He said the party leadership is "out of step with . . . patriotic . . . Democrats."

He also charged that "the liberals" and the Carter administration had allowed U.S. military strength to erode and described his get-acquainted session last Friday with Soviet Foreign Minister Andrei A. Gromyko, his first such meeting as president with a high-level Soviet official, as a major peace initiative -- the first time the meeting has been described in such terms.

In remarks prepared for a Houston fund-raiser, Reagan's final speech of the day, he said he had "no apologies" to offer for the successful invasion of Grenada last year in which he said U.S. forces had rescued Americans from "Communist thugs." Reagan also charged that, in dealing with the Soviet Union, "our opponents . . . keep mistaking weakness for peace."

Reagan's political aides sought to minimize the importance of the impact of the Donovan indictment. Campaign press secretary James Lake said the impact would be short-term and largely limited to "overriding the president's message for a day or two."

But White House spokesman Larry Speakes, who on Monday had refused to say whether the leave of absence Reagan had approved for Donovan would extend beyond Election Day, emphasized today on Air Force One that Donovan would not return to his post or be paid until the charges are resolved.

That set the stage for Reagan's planeside news conference, in which he reportedly had determined to say as little as possible about his embattled labor secretary.

Reagan first said "there is a tradition in the law of our land that's as old as this country, that you are innocent until you're proven guilty, and Secretary Donovan took the step of voluntarily absenting himself . . . ."

But when reporters said there was "hardly any precedent" for having a Cabinet officer under indictment, Reagan turned his fire on his critics.

"I don't think there are many precedents for all the attacks and assaults that have been made on so many people of our administration with allegations and charges that were without any foundation in fact; the people were cleared," Reagan said. "There's a kind of lynch atmosphere in that."

Reagan declined, however, to endorse Donovan's claim that the charges against the labor secretary are politically inspired.

"He is the man who is charged, and I'm not going to comment," Reagan said.

Despite the president's claim that Donovan had decided voluntarily to ask for the leave, campaign officials made no secret of the fact that they were eager for him to do so.

White House chief of staff James A. Baker III, who was not available for comment today, has described Donovan as "an embarrassment" to the administration and once unsuccessfully pressed Reagan to fire him.

On the Beirut bombing, Reagan's decision to accept responsibility was his latest response on the issue.

Last week, Reagan sought to put the blame on a decline of intelligence capability in the Carter administration. When even his national security officials differed with this view, Reagan called former president Jimmy Carter and blamed the account on a "distortion" in the press.

On Sunday, Secretary of State George P. Shultz accepted responsibility for the bombing. Reagan said today, "that was typical of George, and I appreciate it very much," but added: "I was responsible, as I said that I was on the previous tragedy. I was responsible and no one else for our policy and our people being there."

Reagan's reference to the "previous tragedy" was to the Oct. 23, 1983, bombing in Beirut in which 241 U.S. servicemen were killed.

A reporter observed that Reagan had been critical of Carter in 1980 after U.S. diplomats were taken hostage by Iran. Reagan drew a distinction between the government of Iran "with whom we had relations" and unidentified terrorists.

"All I criticized the previous administration about was for our abandonment of the shah and our allowing what happened to happen," Reagan said.

In his Corpus Christi speech, Reagan defended his military buildup and linked it to his recent talks with Gromyko.

"Contrary to what the liberals would like us to believe, by restoring America's military strength, which the previous administration permitted to erode, we are now in a better position to negotiate with any potential adversary," Reagan said. "Just last week, I initiated a new effort to convince the Soviet Union to return to serious arms reduction negotiations.

"I am optimistic that, if we remain firm, the Soviet Union will find it in its interest to join with us in reducing the number of weapons now threatening both our peoples," Reagan said. "But we're not going to achieve this or anything else with self-doubt and unilateral concessions."

In what appeared to be an implied criticism of Mondale, who repeatedly has blamed Reagan for the low state of U.S.-Soviet relations, Reagan said, "in situations like this, all Americans should stand together."