WASHINGTON (AP) _ Sen. Jesse Helms charged Tuesday that Mexican President Miguel de la Madrid was elected by fraud in 1982 through an allegedly corrupt electoral system using ''a double set of books - one public and one private.''

Helms said ''sources within the Mexican government'' had given him documents showing that de la Madrid, proclaimed the winner with 71.2 percent of the vote, actually won only 39.8 percent.

Such fraud, Helms maintained at a hearing he called to focus on the Mexican government, was intended to perpetuate the 58-year rule of the Institutional Revolutionary Party (PRI).

The Mexican Embassy in Washington issued a statement saying the Mexican president does not take any part in the Mexican electoral process.

''Consequently, Sen. Helms' assertion and the supposedly secret figures that he made public in today's hearing regarding recent electoral results are groundless and most probably are intended to confuse public opinion,'' the statement said.

It said votes in Mexico are counted by electoral officers with the participation of representatives from all the political parties running candidates in the election.

And William D. Rogers, a Washington attorney who served as assistant secretary of state for inter-American affairs in 1974-75, said an accusation of the sort Helms made ''drives all Mexican officials into intoxicating nationalistic resentment.''

Rogers noted protests last month which followed a Reagan administration official's accusation of drug-related corruption in the Mexican government. That allegation was voiced by William von Raab, head of the U.S. Customs Service.

In making his accusation, Helms said, ''I'm well aware the Mexican government is going to deny it engages in double bookkeeping.'' But then the senator challenged Mexican officials to respond by opening up the election process to international review and inspection.

Helms said he had been given the purported election documents by Mexican government sources whom he did not further identify.

''The documents show a double set of election results ...,'' he said. ''What we have is a double set of books - one public, one private.''

The documents made available by Helms were typed compilations of the purported election results, and not copies of government documents.

One column was labeled ''public results provided by the Federal Election Commission;'' the other, ''secret results from the presidential chief of staff of the military. ...''

Charges of fraud in the 1982 and 1985 elections are not new.

The strongest of six candidates defeated by de la Madrid for the presidency, Pablo Emilio Madero, charged after that election that the results ''were not clean'' and that opposition observers had not been allowed inside polling places.

Madero represented the National Action Party (PAN), whose spokesman charged three years later that the parliamentary elections ''were illegal. ... a monstrous fraud.''

Mexico faces serious economic difficulties and the United States has recently been instrumental in helping assemble an economic aid package designed to help its neighbor weather the difficulties it has faced as a result of precipitously falling oil prices.

But Helms said Mexico deserves no monetary help from the United States until it reforms its political system.

''If the situation in Mexico continues to be one of corruption, fraud and the strangling of democracy, then vast infusions of U.S. taxpayer's cash will only up more opportunities for corruption and fraud,'' he said.

Helms asserted that the PRI ''buys its political power by using socialist methods of economic control to direct graft and corruption to the ruling circles.''

Helms questioned whether the United States can have a ''consistent and cohesive policy'' with a government which he said is run by a ''one-party socialist system.''

''I can't think of a worse place to thrash out a policy than this hearing room,'' Rogers replied. ''It seems to me an attack on the Mexican presidency, and its honesty and candor with the Mexican people are bound to be counter- productive.

Saying it has ''suddenly become fashionable to pronounce Mexico a menace to our national interests,'' Rogers said the United States appears to be in a period of ''panicky rediscovery'' of Mexico with ''Mexico bashers'' predicting economic collapse, political dissolution and complaining of rampant corruption.

''Strong rhetoric is not the way to manage this relationship,'' Rogers said. ''Denunciation is counterproductive...A fair reading of the situation suggests that the apocalyptic readings of Mexico are vastly overdrawn.''

''There is, in addition, an element of self righteousness to the recent attacks on Mexico,'' Rogers said, referring to the drugs and corruption accusations.

''The United States is the most insatiable market for drugs in all of recorded history,'' he said. ''It comes close to hypocrisy for this nation to condemn Mexico, whose resources for drug policing are a fraction of ours, when we are unable to manage the traffic and consumption in our own nation.''