Several hundred Lebanese residents milled anxiously under the guard of battle-equipped Israeli soldiers as workers threw food from an unattended grocery shop into the dusty, shell-pocked street and a wandering madman keened his grief.

"They are hungry; they haven't had anything to eat or drink for three or four days," explained an unarmed Lebanese security officer who was helping control the distribution under watch by Israeli soldiers.

Sidon in its first days of Israeli occupation is a scene of desolation, destruction and massive military might. What had been a lively, if lawless, port city during my last visit here three weeks ago lies nearly abandoned by its population and cut off from food, water and other supplies. Dozens of offices and apartment buildings are wrecked. The main street has become a staging ground for Israeli armament.

Sidon, which once had a population of 200,000, was a key prize in Israel's sweep up the Mediterranean coast of Lebanon on Sunday, Monday and Tuesday. It was stunned by shelling and besieged by tanks for the first days; by Wednesday Israeli officials said only a few Palestinian guerrillas were still resisting.

By today, the resistance was over. Only a single burst of small-arms fire was heard during a drive up Sidon's main street. The large Palestinian refugee camps on the inland side of town, once home to an important guerrilla force, were silenced.

Villages and towns along the entire route from the Israeli border near Metulla through the Nabatiyah hills and down to Sidon on the coast demonstrated with similar force the overwhelming strength of Israeli troops and tanks.

Nabatiyah, a Palestinian stronghold near the border, has been emptied of guerrilla forces. The only signs remaining are "martyr" posters hailing slain youths, some spray-painted slogans and a captured truck-mounted machine gun being driven down the main street by a bored-looking Israeli soldier.

Beaufort Castle, the Crusader-era fortress that Palestine Liberation Organization spotters had used to direct artillery fire on northern Israel, has been pummeled close to the ground by Israeli bombing. Captured on the second day of the invasion, it is now the destination of visiting journalists on what Israeli Army spokesmen call "Beaufort tours."

The shell-pocked roads that wind through the stark hills east of here are jammed with Israeli equipment in convoys stretching almost without letup from the Israeli border to the coastal Lebanese highway. Although Israeli officials refuse to disclose the number of soldiers in Lebanon, it clearly is in the tens of thousands.

The number is believed to have increased sharply today. Hundreds of tanks, trucks, jeeps, armored personnel carriers and 175-mm self-propelled cannons created giant traffic jams in Metulla this morning.

According to Israelis who spoke with the soldiers, many tank teams had maps of eastern Lebanon's Bekaa Valley and were headed toward Syrian troop concentrations there. Israel has said it is not seeking battle with the 39,000 Syrian troops in Lebanon but is responding when they resist the Israeli advance. This has produced sharp clashes north of the Hasbaya area, on the low foothills of Mount Hermon and leading to the Bekaa Valley plain.

As they sweep northward, Israeli forces are under apparent orders to eliminate Palestinian presence as nearly as possible by killing, capturing or driving the guerrillas toward Beirut. Stragglers are arrested.

One youth picked up by a car carrying foreign correspondents said he was a Lebanese Shiite Moslem who hated Palestinians. After obscene denunciations of PLO guerrillas and their leader, Yasser Arafat, the 16-year-old said he had no identification papers but was trying to get to Damascus to see his mother.

"My sister has just died there, and I didn't even get to see her," said the youth breaking down into sobs. "Maybe you can pick up some papers for me. I must see my mother."

On the road to Sidon, Israeli soldiers at a checkpoint ordered him out of the car and interrogated him. After asking the correspondents what they had been told, one soldier said, "We'll see if we can be convinced too."

Later, as the correspondents passed on their way back to Israel, an officer asked more about what the youth had said--"We suspect he might be a terrorist."

In Sidon the signs of military presence are vivid. Shell holes in buildings and rubble in the streets indicate that the battle in which Palestinians were driven away must have been intense. Most civilians fled as the fighting neared.

About 150 Lebanese have taken refuge in the basement of a hospital. A Lebanese nurse at the facility said it contained only about 25 patients, a possible indication that civilian casualties were limited because of the panicked flight before Israeli artillery and aircraft opened up.

In Beirut yesderday, Francesco Noseda, a spokesman of the International Red Cross, said that he feared that "1,200" Sidon residents were seriously injured and in urgent need of medical help.

Sidon had been a special Israeli target. Traditionally well-disposed to Palestinians in camps nearby, it was the place where the Lebanese civil war first erupted in early 1975--over Lebanese Army attempts to control PLO guerrillas.

Since the war, Sidon had been in effect a PLO protectorate, run by Lebanese leftists in collaboration with Palestinians. In recent months, however, local inhabitants had begun to resent the long Palestinian presence in their city. The ill feeling led to violent clashes a month ago between local leftist militia and guerrillas from the nearby camps. Arafat paid a visit to patch up the quarrel.

It was unclear what effect the Israeli occupation would have on local sentiment about Palestinians--if Palestinians are ever allowed to return. Prime Minister Menachem Begin's government in Jerusalem has vowed they will not be.