Democrats captured governorships in at least eight states yesterday as the troubled national economy undermined Republican fortunes in races stretching from the depressed industrial heartland in the Midwest to the Deep South and the Rocky Mountain West.

The victories gave Democrats their biggest statehouse sweep since 1970.

Democrats took away Republican governorships in Ohio, Michigan, Wisconsin, Minnesota, Nevada, Arkansas and Nebraska and registered a stunning upset of an incumbent in Texas.

But they yielded the statehouses in California and New Hampshire to the Republicans.

Despite their California loss, the Democrats' gains were concentrated in the large states. Going into yesterday's balloting, Republicans held governorships in six of the 10 largest states. As of early morning, they faced the prospect of retaining either three or four.

In New York, Democratic Lt. Gov. Mario M. Cuomo narrowly defeated Republican drugstore magnate Lewis E. Lehrman in a classic liberal-conservative showdown. The race was so close that Lehrman -- who spent more than $10 million advocating a supply-side economic course for New York -- refused to concede early this morning and demanded a recount.

In another seesaw battle, a potential upset was in the making in Illinois as Gov. James R. Thompson trailed Democrat Adlai E. Stevenson III by nearly 140,000 votes with 74 percent of the precincts tallied. It was not clear whether late-reporting GOP strongholds in the suburbs and downstate Illinois would provide enough votes to make up the deficit.

In California, Republican Attorney General George Deukmejian defeated Democrat Tom Bradley, mayor of Los Angeles. Bradley, who sought to become the first black elected governor in American history, had led in polls throughout the campaign.

In another big state race, GOP incumbent Dick Thornburgh of Pennsylvania pulled off a surprisingly narrow escape as the Democratic coalition of blacks and labor turned out a big anti-Republican vote in Philadelphia.

In Alabama, former governor George C. Wallace, once a symbol of segregation who this year successfully courted black voters, defeated Montgomery Mayor Emory Folmar to win an unprecedented fourth term. Wallace, who was left crippled and nearly deaf after an assassination attempt during his 1972 Democratic presidential bid, returns to a job he last held four years ago.

Three other Democrats reclaimed offices they were voted out of four years ago. In Arkansas, former governor Bill Clinton, once hailed as the boy wonder of the New South, claimed victory over Gov. Frank D. White. In Massachusetts, former governor Michael S. Dukakis was returned to office. And in Minnesota, former governor Rudy Perpich recaptured his old post.

Democrats went into the election with high expectations yesterday, but even they were surprised by the upset victory scored by Texas Attorney General Mark White over incumbent GOP Gov. William P. Clements Jr., who spent a record $12 million defending his seat. The campaign dwelt on Clements' blunt and sometimes abrasive style and the Sunbelt state's rising jobless rate.

A total of 36 governorships were up for grabs yesterday, 20 now held by Democrats and 16 by Republicans. Going into the balloting, the line-up of governorships in the 50 states favored Democrats, 27-23.

Early this morning, Democrats were on their way to a total of between 32 and 34 governorships.

Republican National Committee chairman Richard Richards has said all year that the Republicans faced their "greatest risk" in the gubernatorial races, especially in the Midwest, where GOP incumbents retired in Michigan, Wisconsin, Minnesota, Iowa and Ohio.

The Democratic gains will provide the party with an expanded and more secure base from which to launch a run at the White House in 1984. The conventional political wisdom is that a governor can provide his party's presidential candidate with a local organization to get out the vote.

From coast to coast, the races were dialogues on the severe tax and budget squeezes in recession-wracked state capitals. These economic woes generally placed incumbents, especially Republican incumbents, on the defensive. But even with the Democratic victories, there was disagreement about how central a role Reaganomics had played in these campaigns.

"I'd love to say the races were a referendum on Reaganomics, but I just never saw it," said Brian Lunde, director of the Committee to Elect Democratic Governors. "In the Senate races you get the referendum on national issues; in the governors' races it's local issues that dominate."

So far this year, 28 states have raised taxes. Sixteen have taken steps to reduce spending from levels enacted at the beginning of the fiscal year, just four months ago. Most states, unlike the federal government, have constitutions requiring them to balance their budgets.

These pocketbook issues cut in different ways in different races.

In Wisconsin, Democrat Anthony S. Earl all but promised to raise income taxes, and he swept to an easy victory. But in New Hampshire, incumbent Democratic Gov. Hugh Gallen became the first gubernatorial candidate in recent history not to "take the pledge" against establishment of a broad-based state tax, and he was defeated by Tufts University engineering professor John H. Sununu.

Campaign issue papers all over the country were full of job-creation plans, running the ideological gamut from Democrat Roxanne Conlin's public-works bond issue proposal in Iowa to Republican supply-sider Lehrman's massive tax cut proposal in New York.

Conlin lost the race against GOP Lt. Gov. Terry Branstad, who profited from disclosures that Conlin and her husband had invested in tax shelters and paid no state income tax last year.

But the economy, however dominant, was not the only issue in these state contests. In oil-rich Alaska, where the budget problems have to do with surpluses, not deficits, the gubernatorial race was the forum for a squabble over moving the state capitol from Juneau to outside of Anchorage. In Kansas, Gov. John Carlin won reelection on a campaign for a new state severance tax, defeating real estate developer Sam Hardage (R).

In Nebraska, political neophyte Bob Kerrey scored a come-from-nowhere upset over incumbent Republican Gov. Charles Thone, who conceded shortly after 1 a.m. Thone had tied his fortunes to Reagan and faced Kerrey, a Vietnam veteran and Medal of Honor winner, at a time when the farm economy hit bottom.

In Nevada, another state where Democrats seized a GOP seat, Attorney General Richard H. Bryan depicted incumbent Republican Robert F. List as indecisive, and the voters turned List out of office.

Other new Democratic faces in the statehouses included Richard F. Celeste, the former Peace Corps director who highlighted Ohio's economic woes in his campaign to defeat Republican Rep. Clarence J. Brown. And in Michigan, Rep. James B. Blanchard, who led the fight for the Chrysler bailout legislation, defeated insurance executive Richard H. Headlee.

Democratic incumbents who won yesterday included William A. O'Neill in Connecticut, Joseph E. Brennan in Maine, George Nigh in Oklahoma, Richard D. Lamm in Colorado, J. Joseph Garrahy in Rhode Island, Bob Graham in Florida, Richard W. Riley in South Carolina, Harry R. Hughes in Maryland, Bruce Babbitt in Arizona and Ed Herschler in Wyoming.

Republican incumbents were thrown on the defensive this year by the sliding economy, but there were some bright spots for them last night. Winners included Gov. Lamar Alexander in Tennessee, Richard A. Snelling in Vermont and William J. Janklow in South Dakota.

Thompson of Illinois and Thornburgh of Pennsylvania had also appeared headed for victory but high unemployment in both states resulted in narrow margins over their opponents, former Sen. Stevenson and Rep. Allen E. Ertel.

The focus of attention in the western states was in California, where Bradley's once-sizable lead over Deukmejian all but evaporated in the campaign's final days.

In Alaska, Democrat William Sheffield faced Republican Thomas A. Fink.

Incumbent Democratic Gov. John Evans of Idaho was trailing and faced a possible upset loss to GOP Lt. Gov. Phil Batt. The race dwelt on Batt's criticism of Evans for vetoing a state right-to-work law.

Former New Mexico attorney general Toney Anaya, a Democrat, defeated former state senator John Irick. Incumbent Republican Victor G. Atiyeh of Oregon was victorious in his bid for reelection against Democrat Ted Kulongoski, a state senator.

In Georgia, Democratic state Rep. Joe Frank Harris defeated Republican Robert H. Bell.

Incumbent Democratic Gov. George Ariyoshi cruised to reelection in Hawaii.