The 12 states of the Midwest, where there were preelection signs of discontent and anxiety, shuffled the decks in half a dozen big races, but the voters vented their wrath without much regard for party affiliation.

Shaken by a depressed farm economy and continuing stagnation in its basic industries, concerned over the dissolution of rural communities and faltering tax bases, voters in one midwestern state after another nevertheless tended to stick with incumbents in the races for national officies -- although there were several notable exceptions to that trend.

Some simply stayed home. In the Midwest, as in the industrial Northeast, less than 40 percent of eligible voters turned out Tuesday, according to Curtis Gans of the Committee for the Study of the American Electorate. Final figures could make the region's turnout the lowest since 1942, Gans said.

Although a national electoral sweep allowed the Democrats to recapture the U.S. Senate, the party showed only a net gain of one seat in the Midwest. While Democrats nationally were adding slightly to their control of the House, the party could do no better than a one-seat gain in the heartland states.

If change was not the order of the day in the Midwest, exit interview polls by NBC suggested some of the underlying reasons. The interviews indicated that midwestern voters were the most pessimistic in the country, evincing little faith in improvement of the nation's economy or in their own finances. The polls also suggested that Midwesterners felt there was little difference between parties when it came to efforts to revive the U.S. economy.

The only major shifts occurred in the governors' mansions. Republican victories in Wisconsin, Kansas and Nebraska accounted for nearly half of the GOP's national net gain of eight governorships. Kay Orr of Nebraska became the first woman to be a Republican governor in U.S. history with her defeat of Helen Boosalis (D) in another campaign first -- opposing distaff candidates.

In the Senate races, national attention focused on the two least populous states of the region -- North and South Dakota -- where bitter debate over the farm crisis and the Reagan administration's approach to solving it ended in victory for Democratic challengers.

Campaign visits by President Reagan were not enough to rescue incumbent Sens. Mark Andrews of North Dakota and James Abdnor of South Dakota. Andrews narrowly lost to state Tax Commissioner Kent Conrad and Rep. Thomas Daschle (D), South Dakota's lone congressman, edged Abdnor. Both Conrad and Daschle promised beleaguered farmers they would fight for higher farm prices and more generous credit policies.

But the Democrats' senatorial gains in the Dakotas were partially offset in Missouri, where former governor Christopher (Kit) Bond (R) defeated Lt. Gov. Harriett Woods for the Senate seat vacated by the retiring Thomas Eagleton (D). In the only other close midwestern Senate race, Wisconsin Republican Sen. Robert Kasten Jr. edged out Ed Garvey.

In other areas, the voter rebellion that many political observers expected as a result of national agricultural policy simply did not materialize. Two populist Democratic farmers attempting to unseat Republican House incumbents in Missouri went down in defeat. Dale Bell, the GOP candidate for South Dakota's single House seat, running on a "red-meat platform," was skewered by Democrat Tim Johnson.

Minnesota Democrat Collin Peterson, composer of agripolitical ballad called "Just Don't Do Nothin'," an appeal for federal farm production controls, was the apparent loser in a close battle with Rep. Arlan Stangeland (R). Rep. Vin Weber (R-Minn.), under fire for his early support of Reagan farm policy, pulled out a narrow victory over farmer Dave Johnson (D).Illinois

Gov. James Thompson (R), who won his 1982 campaign against Adlai Stevenson III by the most narrow margin in the state's history, easily won this year's rematch. Stevenson opted to form his own Solidarity Party rather than run with two followers of political extremist Lyndon LaRouche Jr., who won primary nominations to key state offices on the Democratic ticket. Thompson won with a 14-point margin.

In the Senate contest, Democratic incumbent Alan Dixon won a second term by defeating state Rep. Judy Koehler, a little-known conservative from rural Illinois, nearly 2 to 1.

Koehler, 44, had run an ad campaign labeling Dixon a "wimp" for remaining on the ticket with the LaRouche candidates. She later attacked Dixon for an article he wrote about terrorism for Playboy magazine, alleging he had "insulted" the women of Illinois.

Illinois polls showed Dixon growing stronger as Koehler became better known, indicating that her tactics backfired.

The state's closest contest was the House race between 81-year-old incumbent Melvin Price (D) and Robert Gaffner (R), a 53-year-old college communications director. With 100 percent of the vote counted, Price led by 162 votes, less than 1 percent, and Republicans were considering a request for a recount.

In other House races, state Rep. Jack Davis (R) narrowly defeated Shawn Collins (D), a 28-year-old former legislative aide, to replace Rep. George O'Brien, a Republican who died earlier this year. State Rep. J. Dennis Hastert (R) narrowly defeated Kane County Coroner Mary Lou Kearns (D), for the seat occupied by GOP Rep. John Grotberg, who retired for health reasons.

Indiana

While Sen. Dan Quayle (R) easily won a second term with 61 percent of the vote, Democrats picked up two new seats in the House, leaving a 7-to-3 Democratic edge in Indiana's House delegation.

Quayle, a freshman senator elected in the 1980 Reagan landslide, defeated Democrat Jill Long, a 34-year-old Valparaiso city councilwoman.

Democrats also picked up a seat in the 5th District, where Republican Elwood Hillis retired. State Sen. James Jontz (D), 33, won by 52 to 48 percent margin over state Sen. James Butcher, a 53-year-old lay preacher who crusaded against abortion and pornography.

In the closest House race in the country, in Indiana's 3rd Congressional District, incumbent Republican John Hiler claimed a 160-vote lead over challenger Thomas Ward after a computer error indicated Hiler had lost. Ward is expected to ask for a recount, while the Hiler campaign plans to ask the Federal Bureau of Investigation to help assure "ballot security." The race promises to be a replay of the bitter 1984 dispute in Indiana's 8th District in which Rep. Frank McCloskey (D) finally took his House seat in May 1985, after a controversial recount gave him a four-vote victory.

McCloskey hung onto his seat Tuesday with 53 percent of the vote, despite a tough challenge from Republican Richard McIntyre in a replay of their 1984 race.

Iowa

Sen. Charles Grassley (R), who had distanced himself from the Reagan administration on farm and defense issues, won as expected, defeating Des Moines lawyer John Roehrick (D), 66 to 34 percent.

In the governor's race, Republican incumbent Terry Branstad won reelection in a difficult race against former state Senate majority leader Lowell Junkins (D), 52 to 48 percent.

In the House races, Republican Fred Grandy, 38, an actor who played Gopher Smith on the television series "Love Boat," narrowly beat Democrat Clayton Hodgson, 52, a corn and soybean grower from northwest Iowa, 51 percent to 49 percent. The seat, in the 6th District, was vacated by retiring Democrat Berkley Bedell.

In the 3rd District, former Iowa Democratic Party chairman David Nagle, 52, defeated Republican former state Rep. John McIntee, 54 to 46 percent.

The House delegation will continue to consist of four Republicans and two Democrats.

Kansas

Kansans voted much as the pollsters had predicted. Senate Majority Leader Robert Dole (R) won an overwhelming but bittersweet victory. As expected, Dole was a runaway winner over Guy MacDonald (D), with 70 percent of the vote. The down side of his victory: as Democrats took control of the Senate, Dole lost the influential platform that he needed as majority leader to mount a run for the presidency in 1988.

Republicans kept their 3-to-2 edge in the congressional delegation. Mike Hayden (R), 42, defeated Lt. Gov. Thomas Docking (D) for the governorship.

Hayden, 42, speaker of the state house and a veteran of 14 years in the state legislature, took 52 percent of the vote in a tight race punctuated in the closing days by controversy over one of his campaign mailings.

Michigan

Democratic Gov. James Blanchard easily defeated Republican William Lucas, the elected executive of Wayne County, by more than 2 to 1. Lucas had switched to the Republican Party last year and hoped to become the first black governor since Reconstruction.

Blanchard, 44, reminded voters that he had cut the unemployment rate in half and had paid off a $ 1.7 billion deficit, which had nearly bankrupted Michigan in 1983.

His victory appeared to have helped some Democratic House incumbents in the state who faced strong opposition.

Rep. Howard Wolpe (D), a liberal, easily defeated Republican Jackie McGregor, who had accused Wolpe of being weak on defense and the antidrug issue.

Democratic incumbent Rep. Bob Carr, who faced a strong challenge from Republican Jim Dunn, a former occupant of the congressional seat, won handily with 57 percent of the vote. Carr, a liberal, was elected to the seat in 1974, but was unseated by Dunn in the 1980 election. Carr reclaimed the job two years later. Dunn was trying for the congressional seat again after running an unsuccessful U.S. Senate primary campaign in 1984 against astronaut Jack Lousma.

Republican Fred Upton, 33, a one-time aide to former Office of Management and Budget director David Stockman, defeated incumbent Rep. Mark Siljander in the primary, and easily defeated political science professor Daniel Roche (D), who was not seen as a strong contender.

Republican Bill Schuette, 32-year-old Midland lawyer who unseated incumbent Donald J. Albosta two years ago, narrowly won a rematch with 51 percent of the vote.

Minnesota

Stangeland won a cliffhanger in 1982, which seemed to be repeated on Tuesday, when Strangeland wound up about 100 votes ahead of Peterson in unofficial counts. But the final tally won't be known until an official canvass is completed Friday in the rural 7th District.

Peterson, a state senator, could claim a moral victory -- he lost by 30,000 votes to Stangeland in 1984. He made up for that loss by tagging Stangeland as a supporter of Reagan administration farm policy and actively campaigned on a controversial farm-production control platform.

Gov. Rudy Perpich (D) was reelected with 56 percent of the vote over former state representative Cal Ludeman (R), as were the five House Democratic incumbents and two other Republicans. Weber, scrambling hard to distance himself from Reagan's farm policy, appeared to be the winner, with a 51 percent edge, over Johnson.

Missouri

The farm-country rebellion against Republicans that many speculated would hit Missouri did not materialize. The GOP picked up the seat of Eagleton, gained another House seat in the St. Louis suburbs and rejected populist farmer House candidates, who threatened incumbents in two rural districts.

Bond, the one-time boy wonder of Missouri politics who now is 44, received 53 percent of the vote in his race against Woods. More of a surprise was the narrow victory of former state representative Jack Buechner (R) over Rep. Robert Young (D) in a rerun of their close 1984 race in western St. Louis County.

Republican Reps. E. Thomas Coleman and Bill Emerson, whose farm districts are among the most economically depressed in the Midwest, overcame challenges by farmers, who earned their activist wings in the American Agriculture Movement. Coleman handily defeated Doug Hughes (D) in the northwestern 6th District and Emerson, with 53 percent of the vote, defeated Wayne Cryts (D) in the southeastern 8th District.

Tuesday's voting left the Democrats with a 5-to-4 majority in House seats, including that of potential presidential candidate Richard Gephardt (D) of St. Louis, who received 69 percent of the vote to win reelection.

Nebraska

In the state's first all-women's gubernatorial contest, Orr, a Republican state treasurer, narrowly defeated Boosalis, Lincoln mayor.

Orr will succeed retiring Gov. Robert Kerrey (D), who decided not to seek a second four-year term.

The race centered on which candidate could do more for the state's depressed farm economy. Orr, 47, also criticized Boosalis, 67, head of the state Department of Aging, for favoring an education bill that carried an increase of 1 cent in the state sales tax.

State Sen. John DeCamp, who lost in the GOP primary, had charged that the race was a "prom queen contest" and threatened to mount a petition campaign to put his name on the ballot. He never carried out that threat.

Despite worries that public anger against the Reagan administration over the farm crisis might produce a backlash against the House incumbents, the three , who are all Republican, easily won reelection.

Doug Bereuter defeated Steve Burns (D), Hal Daub defeated Walter Calinger (D) and Virginia Smith defeated Scott Sidwell (D).

North Dakota

Andrews (R), 60, was narrowly defeated by Conrad (D), 38, who had successfully tied Andrews to the unpopular Reagan administration farm policy through Andrews' vote in favor of the 1985 farm bill.

Conrad has built a reputation as a protector of the interests of the people. Andrews had tried to defuse the farm issue by emphasizing his ability to attract funds to this sparsely populated state.

Despite Andrews' opposition to administration policy in some areas, Reagan had made two visits to the state to campaign on his behalf.

In the state's only House district, incumbent Democrat Byron Dorgan, who preceded Conrad as tax commissioner, won by more than 3 to 1.

Ohio

The breezes of consistency swept Ohio on Tuesday. Sen. John Glenn (D) won reelection in a breeze. Gov. Richard Celeste (D) won in a breeze over former governor James Rhodes (R). Eleven House seats remained Democratic, in a breeze.

As late polls had suggested, Glenn and Celeste each built winning majorities of more than 60 percent and only one House incumbent -- Rep. Edward F. Feighan (D), with 55 percent -- received less than 60 percent.

Glenn defeated Thomas Kindness (R), who gave up a House seat to run against the former astronaut. Kindness' 8th District seat went to Donald Lukens (R), a former House member who defeated farmer John Griffin (D).

Akron Mayor Tom Sawyer (D), 40, defeated Summit County prosecutor Lynn Slaby (R) in the race to succeed retiring Rep. John Seiberling.

The biggest winner in the 21 House races was Rep. Mary Rose Oakar (D), elected to a sixth term from Cleveland with 85 percent of the vote against steelworker Bill Smith of Middleburg Heights.

South Dakota

Former state House speaker George Mickelson (R) defeated former House minority leader R. Lars Herseth (D) to succeed retiring Gov. William Janklow (R), who was defeated in the U.S. Senate primary. But Mickelson took only 52 percent of the vote, giving Republicans a much more narrow victory than the 10-point margin they had expected.

In the state's Senate race, the Democrats moved ahead as Daschle, a four-term congressman, defeated Abdnor by a margin of 52 percent to 48 percent.

The 63-year-old Abdnor, who was swept into office in 1980 with the Reagan landslide, defeating Democratic incumbent George McGovern, was seen as ineffective and his campaign was hurt by the state's reeling farm economy.

Daschle, 38, a militant spokesman against unpopular Reagan farm policies, had worked to turn the election into a referendum on farm policy.

In an expensive advertising campaign, Abdnor had attacked Daschle for attending a fund-raiser in California where he was pictured with actress and antiwar activist Jane Fonda, suggesting that Daschle ran with a "fast crowd" and was not committed to South Dakota's interests.

The ads pointed out that besides being a liberal, Fonda has written health books discouraging the consumption of red meat, a major staple of South Dakota's economy. The aggressive advertising campaign apparently backfired.

In the state's only House district, Johnson won by a wide margin over Bell, a 36-year-old steakhouse owner from Spearfish. Bell had better name recognition and enjoyed an early lead in the fight to replace Daschle, but he had angered many state Republicans in a 1980 primary challenge against Abdnor.

Johnson, a low-key Democrat who worked well with the state's Republican governor, was respected by both parties. Bell ran on a red-meat platform, promising to fight beef imports and to block funding to any federal agency that discourages consumption of red meat.

Wisconsin

Republicans could take solace in Wisconsin. They retained their Senate seat as Robert Kasten overcame his own worst enemy -- himself. Republicans picked up the governor's mansion and held their four seats in the House.

Kasten, who just squeezed to victory in 1980, surmounted controversy over a drunk-driving conviction, his failure to file timely tax returns and personal business associations to defeat Democrat Ed Garvey with 52 percent of the vote. Despite the handicaps that suggested he was vulnerable, Kasten led most of the way in the polls to overcome Garvey's underfinanced challenge.

The only surprise -- a minor one -- was the victory of Tommy Thompson (R), 44, state assembly minority floor leader, over incumbent Gov. Anthony Earl (D) in a gubernatorial race that had been touted as too close to call. Thompson, who tagged Earl as a free-spending and free-taxing liberal, got 53 percent of the vote.

Incumbents won easily in the House races, leaving the Democrats with a 5-to-4 edge in the delegation. Rep. Robert Kastenmeier (D), a 14-term liberal thought to be in a tight race against Ann Henry (R), pulled away at the end for easy victory. Victors included Rep. Les Aspin (D), chairman of the House Armed Services Committee.