The first-anniversary commemorations of the terrorist bombing of the Marine barracks in Beirut and the invasion of Grenada are coming into eerie focus in the last two weeks before Election Day.

Walter F. Mondale has repeatedly cited the deaths of the 241 U.S. servicemen, mostly Marines, in the Beirut bombing a year ago yesterday as evidence of President Reagan's incompetence and negligence.

Campaigning in Portland, Ore., yesterday, Reagan made no mention of the ombing but cited the Grenada operation, which began a year ago this Thursday, as evidence of the strength and success of his foreign policy. This was probably no accident -- public approval of the Grenada invasion, coming just two days after the Beirut bombing, overwhelmingly offset any political liabilities Reagan might have incurred as a result of the Marines' deaths.

This is due, in great part, to the legacy of the nation's two most recent prolonged national traumas -- the Vietnam war and the 444 days that U.S. Embassy personnel were held hostage in Iran. The fifth anniversary of the beginning of that incident is Nov. 4, two days before the election.

The national frustration over Vietnam was greatly intensified and focused during the nearly 15 months that the U.S. hostages were held in Iran. Not only was it a major factor in Reagan's defeat of Jimmy Carter in 1980; it also contributed to a more militant public attitude toward foreign policy and a willingness to greatly increase military spending -- which Reagan has exploited.

Mondale contends that the deaths of the U.S. servicemen in Beirut are inexcusable because the British Embassy was similarly bombed shortly before, and there had been several warnings of an attempt on U.S. installations.

The American people have not appeared eager to search for scapegoats, however.

They seem to accept Reagan's contention that it was an honorable sacrifice in a well-intended attempt, at the invitation of the Lebanon government, to bring peace and stability to that strife-torn nation.

Reagan justified Grenada on the grounds that it was necessary to ensure the safety of the American students in the medical school there and because neighboring Caribbean nations were concerned about a possible communist military buildup by Cuba on the island.

Reagan used the success in Grenada and a nationally televised speech two days after the invasion to defuse any adverse reaction to the Beirut bombing.

A Washington Post -- ABC poll taken the day before his speech showed that 41 percent of the respondents approved of his handling of the Lebanon situation and 53 percent disapproved. In another poll, taken the day after the speech, the figures were reversed -- 52 percent approved of his policy and 42 percent disapproved, even though the respondents thought, by more than 2 to 1, the Beirut bombing could have been prevented.

He also strengthened support for the Grenada operation. The pre-speech poll showed that 52 percent approved and 37 percent disapproved. In the second poll, the day after his speech, 65 percent approved and 27 percent disapproved. The findings showed that those who were most critical of the operation had not listened to his speech.

Reagan also built support for his overall conduct of foreign policy and the use of U.S. armed forces abroad.

Before the speech, 50 percent said they disapproved of his handling of foreign affairs, while 44 percent approved. The day after, this had turned around -- 57 percent approved, 39 percent disapproved.

The day before the speech, 58 percent expressed the opinion that the United States was trying to do too much with its armed forces, while 39 percent disagreed. The day after, 48 percent agreed, while those who disagreed had risen to 49 percent.

Reagan was aided in this by events in general. A Washington Post-ABC poll in late September last year found that 21 percent of the respondents thought that events in Lebanon were important enough for the United States to risk going to war there. Just before his speech a month later, this approval rating had risen to 33 percent; after the speech, it was 35 percent.

The Iranian hostage situation was the most consuming national agony since Watergate and Vietnam, but unlike them it was a nationally unifying crisis -- to Reagan's benefit both in the election and the conduct of his policies.

When the hostages were released, the Iranian government added one last insult to the injury by crowing: "We managed to rub the nose of the biggest superpower in the world in the dust."

The public's reaction to the release of the Americans was an emotional, patriotic outburst, and a resolve that such a humiliation would never happen again. Today, Reagan, the political beneficiary of that mood, is to speak at a ceremony in the White House Rose Garden.

Students from the medical school on Grenada, whose safety was a rationale for the invasion, will go to Arlington and lay wreaths on the graves of the U.S. servicemen who died in the invasion, and present medals to representatives of the armed services involved in the mission.