Several big-city mayors railed and several thousand big-city workers rallied at a Capitol Hill demonstration yesterday against proposed cuts in federal programs for urban areas.

"Don't hack us, don't torture us, don't destroy us," New York City Mayor Edward I. Koch (D) said was the message from the nation's cities to President Reagan and the Congress.

The bipartisan U.S. Conference of Mayors, which organized the rally at the West Front of the Capitol Building, proposed an alternative plan to reduce the federal deficit: a spending freeze on all domestic and military programs except those for low-income persons, higher corporate taxes, and an increase in the federal gasoline tax.

This proposal would cut the federal budget deficit by $80 billion in fiscal 1986, the mayors group estimated.

Reagan proposed deep cuts in several urban programs, including elimination of the $4.6 billion general revenue sharing program, an end to the $400 million in Urban Development Action Grants, reductions in mass transit and a freeze in housing aid.

The mayors said the proposed cuts, which would reduce aid to state and local governments by $11.8 billion in the next fiscal year, would force cities to raise taxes and cut services and would adversely affect the poor and elderly.

"We need help for our cities, help for our senior citizens, help for the poor . . . ," said D.C. Mayor Marion Barry (D).

Yesterday's crowd, estimated at between 4,500 and 5,000 persons by the U.S. Capitol Police, appeared to be mainly New York City union members.

Cities "are the repositories of civilization, culture, art, infrastructure, fine cuisine . . . ," said Chicago Mayor Harold Washington (D). "To reduce us to special pleaders . . . is to put cities down."

Funding for the MX missile came in for some of the heaviest criticism.

"If you build a steel wall around this country and the people behind the wall you are defending are going into abject poverty and the government is perceived as the enemy, then what have you preserved, what have you defended, what have you saved?" Koch said.

This month, the Senate Budget Committee narrowly approved a fiscal 1986 budget that would cut but not eliminate the general revenue sharing program and the urban development grants while allowing the defense budget to grow by inflation.

Work has not begun on the budget in the House.

The only Republican mayor who spoke at the rally was Theodore D. Mann of Newton, Mass.