President Reagan, seeking to win the support of skeptical House Democrats for a compromise plan to aid the Nicaraguan rebels, yesterday disavowed military overthrow of the Sandinista government and expressed willingness to consider resumption of direct peace talks.

"We do not seek the military overthrow of the Sandinista government or to put in its place a government based on supporters of the old Somoza regime," Reagan said in a letter to Rep. Dave McCurdy (D-Okla.), a member of the House intelligence committee who voted against aid to the counterrevolutionaries in April but is now working with Minority Leader Robert H. Michel (R-Ill.) on the package that will be presented in the House today.

McCurdy, one of 31 members of a bipartisan delegation who met with Reagan at the White House yesterday, said afterward that Democrats "ought to stand up and declare a victory" because "what we've been able to accomplish here is a shift in emphasis within the administration's policy."

McCurdy predicted that 25 Democrats who opposed the Michel amendment when it was defeated by two votes in April would support the proposal now. The package provides for $27 million in "humanitarian aid" to the rebels, known as contras, to be distributed in three installments ending next March, with congressional review at each step.

"We are going to pass it," predicted Rep. Joseph M. McDade (R-Pa.), who joined with Michel, McCurdy and Rep. Dante B. Fascell (D-Fla.) in briefing reporters after the meeting with the president.

The letter to McCurdy was more conciliatory than any other recent declaration by Reagan about the Sandinistas. In it the president said the United States "condemns, in the strongest possible terms, atrocities by either side," the first recognition he has given to brutality allegations against the rebels.

His disavowal of any U.S. intent to overthrow the Nicaraguan government contrasted with his statement at a Feb. 21 news conference where Reagan said the Nicaraguan government should be "removed in the sense of its present structure" and called on the Sandinistas to say "Uncle."

But the Reagan letter, for all its conciliatory language, was also seen by the White House as a weapon for defeating two Democratic amendments that supporters of the Michel amendment say would "gut" the package.

House Democratic leaders were optimistic about chances for passing the amendments by Rep. Edward P. Boland (D-Mass.) and Richard A. Gephardt (D-Mo.). And House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) stepped up his attack against the Michel pacakge, citing claims by former contra leader Edgar Chamorro that the rebels are a "front organization" for the Central Intelligence Agency.

"The Michel measure tries to hide the CIA role in this whole affair by prohibiting the contra aid from being distributed by the CIA," O'Neill said in a statement. "The contradiction is obvious: how can the Michel amendment keep the CIA out of an operation which is a CIA 'front' to begin with."

The Boland amendment would prohibit U.S. funds for intelligence agencies from being used directly or indirectly to support military or paramilitary operations inside Nicaragua. The Gephardt amendment would delay aid to the contras for six months, at which time Congress would have to vote on the issue again.

Rep. Richard B. Cheney (R-Wyo.), a member of the intelligence committee, called the Boland provision "a killer amendment" that would, under strict interpretation, prevent even humanitarian aid to the contras unless they laid down their arms. Cheney and Reagan's letter to McCurdy also objected to the amendment because it would prevent intelligence agencies from "exchanging information to sustain and preserve the democratic resistance."

Democrats disputed this interpretation, saying that any funds that did not flow through the CIA or another intelligence agency to the contras would not be affected by the Boland amendment.

The key question for Republicans is likely to be the decision on what to do if the Boland amendment is attached to the Michel package. One member of the House leadership said, "It would be like having nothing. We'd have a pretty hard time holding our guys."

In a similar situation in April, Republicans turned against their package after it was revised to contain only a Democratic-sponsored amendment providing only humanitarian assistance to refugees outside Nicaragua.

A more likely strategy this time, according to administration and congressional sources, is for Republicans to support the amended bill in the hope of improving it at a subsequent Senate-House conference committee.