President Reagan wound up his personal campaigning in the midterm elections today by urging New Mexico voters to reelect a once-secure incumbent Republican senator who, GOP officials acknowledge, is in a tight battle for political survival.

In remarks at a rally at the Roswell Industrial Air Center, Reagan praised Sen. Harrison H. Schmitt (R-N.M.), a former astronaut, for showing "the grit and honesty it takes to make the hard choices and cast the tough votes."

The speech here was the final campaign stop of a two-day, five-state western swing in which Reagan sought to use his popularity in the region to preserve Republican control of the Senate.

The trip was the windup of a "save your base" strategy for Reagan and the Republicans as GOP Senate candidates find themselves in unexpectedly close contests in western states where Reagan ran strongest in 1980.

Late campaign television advertising by Schmitt aimed at heading off the surging challenge of Democrat Jeff Bingaman, the state attorney general, has been denounced as dishonest by prominent members of the state's legal community and "unfortunate" even by GOP gubernatorial candidate John Irick, who shared the stage with Reagan today.

One of the ads alleges that Bingaman ducked the responsibilities of his office by failing to prosecute inmates responsible for the New Mexico prison riot in February, 1980, in which 33 people died. A citizens' advisory panel set up to investigate causes of the riot denounced Schmitt's ad as untrue.

The other ad charges that Bingaman recommended that the governor pardon a prisoner who had been on the FBI's most-wanted list.

Bingaman has referred to the ads as "two lies" in commercials of his own. Republican sources close to the campaign said today that Schmitt was "about even" in the latest GOP trackings, and conceded that this could mean a Bingaman victory.

But en route back to Washington tonight, Lee Atwater, deputy political adviser to Reagan, said he is convinced that Schmitt will be reelected and that "The president's visit had a significant impact on the race."

The president is not scheduled to do any more campaigning in person before the elections, but a five-minute pre-taped television commercial will begin running Saturday in 60 regional markets and is scheduled for network television Sunday and Monday evenings.

The commercial, like Reagan's speeches today in Roswell and Salt Lake City, is a variation of his familiar message that economic recovery is at hand if Americans are willing to "stay the course."

"Make no mistake, America's future is a future of hope, and it grows brighter each day as more people respond to the drop in inflation, tax rates and interest rates," the president said here.

Earlier, at the Salt Palace in Salt Lake City, where he appeared in behalf of Sen. Orrin G. Hatch (R-Utah), Reagan pointed to recent economic news as evidence that the situation is improving.

"Yesterday, we learned that productivity increased sharply in the third quarter," Reagan said before an enthusiastic, placard-waving crowd of more than 8,000. "This morning . . . Americans awoke to see another patch of blue. The leading indicators which measure the vital life signs of our economy to forecast its future direction were up in September, and that's the fifth month of increase in the last six months."

Reagan acknowledged, as he has throughout the campaign, that unemployment, now at its highest level since the Depression, is a serious problem, and he appeared testy about projections by the Joint Economic Committee of Congress that the employment figures for October will show a 10.5 percent jobless rate.

When he was asked about the projection again as he boarded Air Force One, Reagan shouted: "Who dominates that committee?"

On board the plane en route from Las Vegas to Salt Lake City, White House spokesman Larry Speakes said that Reagan meant that Democrats dominate the committee, and added, "Put a little salt and pepper on that report before you digest it."

Unlike Schmitt, Hatch appears to have a solid lead over his Democratic opponent, Salt Lake City Mayor Ted Wilson. But even in Utah, where Reagan received his biggest percentage (72.8) in the 1980 presidential election, the race was considered close enough that the president was asked to provide last-minute help.

In the five states where Reagan campaigned the last two days the only likely Republican winners at this point appear to be Hatch and Sen. Malcolm Wallop of Wyoming. GOP Senate challengers Larry Williams in Montana and Chic Hecht in Nevada are trailing Democratic incumbents John Melcher and Howard W. Cannon.

Republican sources in Nevada said that Hecht has now fallen well behind Cannon. Today The Las Vegas Sun, which had applauded Hecht's late entry into the GOP primary, endorsed Cannon for reelection on the basis that his seniority would be helpful to Nevada.

Reagan campaigned for Hecht Thursday night in Nevada, and then retired to a suite in the Sands Hotel on the Las Vegas Strip, where he briefly appeared as the announcer for a song-and-dance team 28 years ago in what he referred to as "another life."

Reagan is scheduled to spend the weekend at Camp David.