In the name of its employes, the federal government gives more than $82 million a year to charity, and the scrambling for the money in the last few weeks has been especially rancorous.

Practically all of the do-gooders in the country, it would seem, have been at each other's throats.

"Charities!" said one somewhat dazed official at the Office of Personnel Management, where the rules for distributing the money are set. "I've never met with more uncharitable groups in my life. We've been striving to be fair. What's happened is we've been finding out that they all hate each other."

The occasion for all the squabbling was a proposed set of regulations for fund-raising among federal workers who pledge the money from their paychecks each fall, usually without the slightest appreciation of the politics of their benevolence. It was the first major revision of the rules since a single, once-a-year campaign to generate the money was started in the government on a test basis in 1964.

The results were published Friday in the Federal Register. Calm, at least momentarily, was restored. The American Heart Association and its colleagues in the health field were pleased. The Save-the-Children Federation and its partners in "international service" were relieved. Outsiders, represented most vocally by an organization called the National Committee for Responsive Philanthropy, were hopeful.

The United Way of America, sometimes uncharitably described as "the octopus of benevolence," decided to grin and bear it.

"The two big issues are who gets in and how you divide up the money," OPM Director Alan K. Campbell said in an interview.

Under the rules he approved, local charities, for the first time, will be able to benefit from the Combined Federal Campaigns across the country without being a member of the local United Way organization. And for the first time, new national organizations with a "domestic welfare service function" will be eligible for a piece of the pie.

The Office of Personnel Management also changed the complex distribution formula that worked primarily to the benefit of United Way.

Campbell still won't be surprised if his agency is taken to court.

"Satisfying everyone is not possible," he said. "It's a classic case of 'no win.' People feel intensely about this. It's big money."

The intensity was reflected in recent weeks in heated meetings at the federal agency with interested charities, in calls from Capitol Hill and high-powered corporate executives, and in appeals to the White House. President Carter, Rosalynn Carter and most of the White House senior staff all were peppered with mail or phone calls from one side or another, according to an adviser there. The White House refused to get involved and directed everyone to Campbell and his aides, according to an OPM spokesman.

The stakes are reflected in the results from last fall's 549 campaigns, each conducted separately by local federal coordinating committees in communities from Twentynine Palms, Calif., to Limestone, Maine. They produced donations and pledges of $82,406,000.

Federal workers earmarked some of the money for particular causes -- on the government-approved lists -- such as the American Cancer Society or the Boy Scouts, or Project Hope -- but two-thirds of it was 'undesignated" money, to be doled out under OPM's intricate rules.

Under the old system, the most popular charities, or those with the best publicity operations, tended to wind up with the least in "undesignated" funds. Their predetermined "dollar base" in each year's federal campaign could be filled entirely with designated contributions.

The 17-member national health agency bureaucracy (Heart, Cancer, Diabetes, March of Dimes, Cystic Fibrosis, etc.) was particularly unhappy about that. In Washington, D.C., for instance, the federal campaign raised $11.7 million in 1978 and of that, some $7 million was in undesignated contributions.

"Out of that $7 million, the health agencies did not receive a single dollar," says Grady Stevens of Dallas, an American Heart Association executive who is chairman of the national health agency group.

The United Way agencies in turn, get the most undesignated money. In last fall's campaigns, according to an incomplete breakdown, they wound up with $58.2 million in designated and undesignated contributions. The health agencies got $17.4 million. The international service agencies (Save the Children, Planned Parenthood, World Population, CARE and others) got $5.4 million.

Deciding that the system was "too inflexible," Campbell has abandoned the "dollar base" limits and adopted a new formula for allocating undesignated funds without regard for earmarked contributions. It represents a turnaround from his agency's original proposal on Feb. 12, which United Way of America basically had endorsed.

United Way spokesman Steve Delfin said the charity organization -- which raised $1.43 billion from al sources last fall -- "would perhaps have preferred a different outcome." from OPM, "but we are willing to work within the spirit of the new rules."

Federal campaigns mean a lot to United Ways, especially in cities such as Washington, where contributions from government workers produced 40.9 percent of the total United Way budget; or in Ogden, Utah, where they amounted to 44.3 percent and Fayetteville, N.C., where they accounted for 53.1 percent.

"United Ways represent at least 37,000 agencies across the country," Delvin said. "We get 75 percent of the Combined Federal Campaign dollars, but we represent close to 90 percent of the agencies that get the money . . . . bOur hair stands a bit on edge when people talk about how the [federal] campaign is weighted towards United Way. The reason we receive the bulk of the funds is obvious."

Perhaps the most significant aspect of the new rules is the invitation to new organizations.

"A major breakthrough," said Robert O. Bothwell, executive director of the National Committee for Responsive Philanthropy, a four-year-old coalition of public interest, social action and volunteer groups. "It is a major precedent to admit local charities that are not members of United Way." m

By contrast, Bothwell had denounced the federal agency's first proposal Feb. 12 as "obscene . . . illegal and horribly limited." It would have required new local charities to submit their federal campaign applications to United Way, a procedure that Bothwell assailed, as assigning the wolf to guard the sheep.

The international health service agencies (collectively known as ISA) also were upset because new national welfare agencies would have been lumped with them in federal fund-raising lists. Attorneys for the health service agencies threatened to sue the government.

The merger "would effectively destroy ISA as an identifiable voluntary group," the lawyers protested in a letter urging more concern for the plight of such people as the Cambodian refugees. "OPM's destruction of one of the major organizations supporting humanitarian work overseas would signal a turning away from the world at large."

OPM decided to leave the international agencies alone. It also agreed to have local federal coordinating committees, instead of United Way, handle applications of new local charities who don't belong to United Way.

What still has federal officials shaking their heads, however, are the accusations that were hurled their way and the backbiting among the organized charities.

"I've been called anti-crippled children," said the federal agency's public affairs director, Robert L. Woodrum. "I've learned that it's possible to be all bad things to all people . . . . The charity business isn't what you think it is."

"Maybe our mistake was to see them individually," said another official, who asked not to be named. "They would have corrected each other if we'd seen them all at once. But you cannot trust their word."

Much of the impetus for change came from the House Civil Service subcommittee headed by Rep. Patricia Schroeder (D-Colo.), who held hearings on the federal campaigns last fall and urged thay they be opened up to "those working with deprived segments of society" in such fields as citizen action and community control.

Campbell, however, decided to stick with the more traditional concept of "direct service" organizations, ruling out support for such groups as the Women's Legal Defense Fund.

"The National Committee for Responsive Philanthropy pushed us very hard to admit environmental groups, legal groups, advocacy groups that do not provide direct services," Campbell said. But, he added, "I have a real problem with a fund-raising campaign advocating government support donations to an organization if part of that money is being used to influence government policy."

Bothwell hinted that some interesting legal tests may lie ahead, especially if the "direct service" rule is used to keep out organizations working for racial minorities or women's rights. He said he is "truly worried" about the influence that United Way organizations have over local federal coordinating committees, where all the applications eventually wind up.

For the United Way, Delfin protested that its critics fail to recognize that its member agencies are changing, even if they keep the same name. He said the YWCA, for instance, is working in such fields as spouse abuse and mastectomies.

In any case, he called the new rules a better balance "between the status quo and radical change" than the recommendations of Schroeder's subcommittee.

The subcommittee, he asserted, "wanted to take a system that has worked well for 25 years and turn it upside down, based on a few complaints."