While most politicians ignore the past at their peril, Ronald Reagan often seems immune to the pitfalls of history. In California, he was sometimes called "the great Rondini" because of his miraculous escapes from apparent political disaster. As president, he has defied dire predictions about budget deficits and plowed ahead with his agenda of cutting taxes and building U.S. military strength.

Nonetheless, the odds seem to be heavily against the president and his party in their goal of preserving control of the Senate in 1986. The Senate is critical to Reagan, who may find the last two years of his presidency legislatively barren if Democrats totally control Congress.

There are not many recent presidents with whom Reagan can appropriately be compared. Richard M. Nixon did not last his second term, and no analogy can be drawn from 1974. The two other modern second-term presidents cast long shadows, as does Reagan, but offer little historical consolation.

Democrat Franklin D. Roosevelt was elected four times, but the 1938 elections, after six years of the New Deal, provided a political low point of his presidency. Republicans, then a hopeless minority, gained seven Senate seats and 75 House seats.

Republican Dwight D. Eisenhower, to whom Reagan has been compared frequently, also fared dismally at the six-year point of his presidency. Republicans, two seats from capturing the Senate in 1956 and within striking distance of controlling the House, were reduced to distant minority status by the 1958 midterm elections. The GOP lost 47 House seats and 13 Senate seats. The Republicans have never really been close in the House since then and did not win the Senate until the 1980 Reagan landslide.

Next year, when Senate recipients of that landslide face the voters, 22 Republican incumbents will face reelection campaigns compared with only 12 Democrats. GOP difficulties were compounded when Sen. Paul Laxalt (R-Nev.) decided not to run, giving the Democrats a genuine chance in Nevada. Additionally, Republicans strategists are worried that Sen. Charles Mc. Mathias (R-Md.) will step down, a decision that probably would presage Democratic victory in Maryland.

This is the political arithmetic underlying deep divisions between the Republican Senate and Republican president on defense, economic and agricultural policy. In presidential election years, the need for a united front tends to heal these divisions but, in midterm elections, tension between local and national issues pulls apart congressional and presidential wings of the party in power.

Tension is particularly great at present because Reagan tends to be more popular than his policies. Farm-state Republican senators, a dozen of whom are up for election in 1986, will gain no credit for slashing farm subsidies and could be torpedoed by a Reagan veto of the farm bill. Few Republican senators can depend on any "Teflon factor" or generalized support for Reagan to pull them through.

What Republican senators can depend on, and have been getting from the White House, is the president's fund-raising appeal. Recent elections suggest that the GOP has a significant advantage in using such modern technology as sophisticated direct-mail operations, continuous polling and computerized phone banks. Early fund-raising is a key to exploiting this technological advantage.

Republicans also have succeeded when they have been able to "nationalize" midterm elections, as they did with the tax issue in 1978. Democrats more often atomize the elections, with each candidate running on his own.

But that isn't what seems to be happening now.

In advance of 1986, Republican senators are carving out their issues, irrespective of whether they coincide with the White House agenda. Sen. Charles E. Grassley (R-Iowa) pointed the way early this year when he broke with the White House on key defense issues.

For most politicians, self-preservation is the first rule. Next year, Reagan's best hope of once more defying history may be to raise as much money as he can for his Republican colleagues in the early going and allow them to go their own way until after the election. Reaganism of the Week: Asked about the value of a liberal arts education in today's high-technology society, Reagan replied, "Well, I have one myself, and I've been trying to figure how it set me back."