The Democratic National Committee's campaign to keep independent John B. Anderson's name off the November ballot has turned into a public relations nightmare.

"We've been on the defensive on this for two weeks," press secretary Robert Neuman said the other day as he fingered through a thick folder of editorials and letters protesting the action. "I've been fighting brush fires all over the place."

At least 10 of the party's most influential senators, two party organizations and more than a dozen members of Congress have formally condemned the committee's efforts -- once expected to cost $225,000 -- as unworthy of the party and a waste of time and money. Others privately grumble that it is giving Anderson's candidacy a big boost by making him appear to be a martyr.

The DNC's efforts "produced a bonanza of publicity and sympathy for Anderson," said Rep. John L. Burton (D-Calif.), a former state Democratic chairman. "It benefited Anderson and made the Democratic Party look like a big bully."

"The Democratic Party has more noble causes than to squander money, time and good will in an effort to keep John Anderson off the ballot," said Sen. Gaylord Nelson (D-Wis.). "People should be allowed to express their will without political interference from the DNC."

Much of the criticism is cloaked in high-minded-sounding rhetoric about democratic principles. But there are some good political reasons underlying the cries of outrage.

Nelson and several other liberal Democrats think that having Anderson's name on the November ballot will help them win reelection.

Richard Colon, staff director of the liberal Democratic Study Group, estimates that Anderson's presence on the ballot could save two dozen or more Democratic seats in Congress by bringing to the polls liberal voters turned off by a Carter-Reagan choice.

Put another way, the self-interest of many congressional Democrats is in direct conflict with the self-interest of President Carter, who DNC Chairman John White insists will lose in November if Anderson gets on the ballot in enough states.

This creates an ideal situation for the Anderson camp. In effect, it can play the issue from both sides. Two examples:

On Sunday, the campaign ran a large ad in the Boston Globe. "Jimmy Carter thinks he can deprive the voters of Massachusetts of a real choice in November," it read. "Sixty-four minutes before John Anderson's name was to be placed on the official Massachusetts ballot, his independent candidacy for president was challenged by agents of the Democratic National Committee . . . This blatant attempt to keep John Anderson off the ballot in November is an act of desperation by a handful of powerful politicians who fear the growing impact of his candidacy."

On Tuesday, the campaign released a letter signed by 24 Republicans and Democrats asking DNC Chairman White and GOP Chairman Bill Brock not to take part in any activities designed to block Anderson from getting on state ballots.

Among the signers were Democratic Sens. Adlai E. Stevenson (Ill.) and George McGovern (S.D.), the party's 1972 presidential nominee, and eight House Democrats.

Other Democratic senators -- among them Majority Leader Robert C. Byrd (W.Va.), Majority Whip Alan Cranston (Calif.), Henry M. Jackson (Wash.), Thomas F. Eagleton (Mo.), David H. Pryor (Ark.) and John C. Culver (Iowa) -- have expressed similar feelings and tried, with some success, to persuade Carter strategists to tone down their anti-Anderson campaign.

And the Iowa and Wisconsin state party conventions passed resolutions condemning anti-Anderson activities.

Jackson described the DNC effort as "foolish and counterproductive." Pryor said he was "outraged and embarrassed" by a report in The Washington Post that the party planned to spend $225,000 in its effort to keep Anderson's name off the ballot.

Eagleton warned, "I think this kind of legal maneuvering can backfire. It smells of smoke-filled-room politics and that could turn people off. It certainly turns me off."

"When we have congressmen and senators in trouble all over the country, to spend a quarter of a million dollars against Anderson seems to make a mockery of the word 'Democrat,'"said Rep. Patricia Schroeder (D-Colo.).

White has tried to counter the criticism by repeatedly denying that the party had budgeted $225,000 for the campaign, and by sending a letter to congressional leaders and Democratic chairmen in each state.

"In no state where John Anderson's candidacy is permitted by law will the DNC cooperate in any legal challenge to this ballot access," the letter says.

This has left the impression among some recipients that the DNC has curtailed its efforts. But party spokesmen, who earlier had confirmed the $225,000 figure, say there has been no change in strategy. And in the last two weeks, attorneys representing the DNC have appeared before commissions in Massachusetts and North Carolina, two states where Anderson was trying to get on the ballot.

In his letter, White argued: "Politically, the short-term consequences of Anderson's candidacy, according to nearly every major poll, will be to elect Ronald Reagan, even though a majority of the nation's voters do not approve his leadership or policies . . . The longer-term consequences may be even greater and even more destructive of the stability of government we have enjoyed through the combination of a strong majority party system and the direct primary system of selection of candidates."

But Cranston argues that "the Democratic Party has been in the forefront of the historic battle for an open, free political process. We should not be throwing legalistic roadblocks in the way of the people's right to select their president from the widest possible choice of qualified candidates."

Thus far, Anderson has gained a place on ballots in New Jersey, Utah, North Carolina and Kansas. He has the required number of signatures in 10 other states.