To a world long accustomed to rising prices for just about everything, the sharp decline in prices for many commodities, such as wheat, crude oil and some metals, has come as a distinct shock.

For most consumers, the shock has been a pleasant one. Filling up at the corner gas station, for instance, is now a matter of $12 instead of $18 for many drivers.

For unemployed copper miners, bankrupt independent oil drillers and a significant number of farmers, the shock has been devastating. In the first five months of this year, nearly 100,000 people employed to find or produce oil and natural gas lost their jobs as a direct consequence of lower oil prices.

Meanwhile, as the prices of the commodities have tumbled, so has the value of the land and equipment used to produce them. According to Federal Reserve figures, the value of land held by all farm businesses fell by nearly $200 billion, or 30 percent, between the end of 1983 and the end of 1985. In some areas, the value of farm land is less than half what it was five years ago.

Falling prices and loss of real asset values have caused some economists to raise the specter of a generalized deflation -- a downward spiral of all prices and forced sales of land and other assets that would totally disrupt the economy and throw millions of people out of work.

That sort of spiral was an integral part of the Great Depression, in which the nation's general price level fell by nearly one-fourth between 1929 and 1933. That means that something that cost $1 in 1929 cost only about 75 cents four years later. At the same time, the civilian unemployment rate soared from 3.2 percent to 24.9 percent.

Fearing that the patches of deflation in oil, farming and mining will spread to the rest of the economy, a small number of economists, such as Alan Reynolds of Polyconomics Inc., a New Jersey consulting firm, want the Federal Reserve to pump money into the economy until commodity prices are stabilized. Presidential hopeful Rep. Jack Kemp (R-N.Y.) has expressed the same fear and has urged the Fed to act.

On the other hand, most economic analysts believe the chances of a generalized deflation are very remote. However, few, if any, will say flatly that it could not happen.

One of these analysts, Alan Greenspan of Townsend-Greenspan & Co., a former chairman of the Council of Economic Advisers, argues that, because inflation is essentially a monetary phenomenon, "it is not credible to presume a lower level of prices over the long run without a corresponding contraction of money supply." And he added, "Any marked decline in the general price level would almost certainly be countered by a flood of money creation by the world's central banks. This, in turn, would bring any disinflation to an end."

Nevertheless, Greenspan said in a recent commentary on PBS television, it could happen. Suppose the economy dipped into a recession. The many corporations that have very high debt loads could find themselves unable to pay their interest and other bills as their sales declined. To fend off bankruptcy, the firms would begin to sell productive assets, probably at fire-sale prices.

"The new owners of productive property acquired at lower prices and, hence, having lower interest and depreciation costs to recover, would be pressed by competition to bring prices of commodities down as well," Greenspan said. "Of course, in such an environment, the contraction in economic activity would reinforce the fall in prices." The Federal Reserve would have a hard time countering this process since it would have begun with prices of existing assets rather than prices of currently produced commodities, he added.

"None of this ominous scenario seems at all likely at the moment," he said. "Nonetheless, as bull market euphoria mounts, history warns of some unpleasant surprises."

The obvious way to avoid this "ominous scenario," according to Greenspan's analysis, is to avoid a recession. Again, only a few forecasters think an economic downturn is likely during the next year and a half.

Lyle Gramley, chief economist of the Mortgage Bankers Association of America and a former Federal Reserve governor, is another analyst who will not say that deflation could not happen again. And he agrees that the way to make sure that it doesn't is to keep the economy growing.

Gramley said he is confident that after the current quarter, which likely will show only a weak increase in the gross national product, growth will speed up. During the next 18 months, he predicts, economic activity will increase at an average 3.5 percent annual rate. "I think the second quarter will be the last quarter of sluggish growth," he said.

Once growth picks up, Gramley continued, "the possibility of having these scattered patches of deflation spread becomes more limited."

At the moment, there is no sign either of a downward spiral in prices or of the spread of the problems in oil and gas, farming and mining.

While the consumer price index declined in February, March and April at a 4.3 percent seasonally adjusted annual rate, most of the drop was due to lower prices for petroleum products and natural gas. Excluding energy products, the CPI rose at a 2.9 percent rate during those three months.

Crude oil prices, which have dropped about 50 percent in the past year, have bounced around recently, and it is unclear if they have hit bottom, but many analysts believe the decline is about over. If that is the case, the CPI should begin to rise again soon, these analysts argue.

A burst in gasoline prices in May was blamed for helping to push the CPI up 0.2 percent last month.

Food prices also have been declining recently, largely as a result of lower prices being paid farmers for their crops and livestock. But the decline has been far more modest than for gasoline or home heating oil. In the 12 months that ended in May, food prices were up 2.8 percent while energy prices were down 14.8 percent. The overall CPI was 1.6 percent higher in May than it was a year earlier.

Meanwhile, except in a very limited way in some parts of the country, the troubles of farming and other natural resource industries have not spread to other sectors of the economy or to other parts of the country.

One major reason the effects of deflation have been contained is the network of federal and state income support programs that were not available when the Great Depression started nearly half a century ago.

For example, federal farm support programs likely will pay out around $25 billion this year. The payments can have a dramatic effect on personal income levels in a farming region, such as Nebraska, one of the states hit hardest by the decline in farm prices. Between the fourth quarter of 1984 and the fourth quarter of last year, payments by federal farm programs were so ample that personal income in that state rose 9.9 percent, the largest gain in the nation, according to the Commerce Department.

However, further west in Montana, hurt by problems in mining and timber as well as in farming, personal income fell 2.1 percent during 1985, a decline virtually unprecedented in modern times, except perhaps during a severe recession. No other state had a drop in personal income last year.

In the sprawling area served by the Kansas City Federal Reserve Bank, which runs from Nebraska to Oklahoma and from western Missouri to Wyoming, Colorado and northern New Mexico, the economy today is a "mosaic," said Mark Drabenstott, a research officer at the bank.

Oklahoma and Nebraska are suffering, but Kansas City is prospering. Along the Front Range of the Rockies, Denver is growing, and not far south in the state, Colorado Springs is a "boom town," says Drabenstott. The latter city is the headquarters for the Reagan administration's Stategic Defense Initiative, otherwise known as Star Wars.

The point is that the problems of deflation are not dragging down the entire region, even though they have led to dozens of failures among small banks serving agricultural areas. But the largest number of failures of financial institutions since the Depression has not undermined public confidence in the nation's banking system, Drabenstott said.

Federal insurance of deposits, another program not available in the Depression, is in large part responsible for that continued confidence.

"We did have deflation in the '30s," noted Allen Sinai, chief economist at Shearson Lehman Bros. "The price declines fed upon themselves. But we had big policy errors, too. There were tax increases, and the Fed did not act to reverse the decline in money supply during the Depression.

"Now there is good growth in liquidity and money in most countries, and there is more talk and cooperation among countries now than in the '30s," Sinai continued. "It is just hard to see a cumulative deflationary threat. The fear in the financial markets is just the opposite. The fear there is that we will move out of deflation directly into rapid inflation.

"I think that deflation has about run its course, though not entirely. When the economy picks up steam, and the rest of the world economies do the same over the second half of this year and in 1987, basic commodity prices should firm -- not necessarily rise, firm," Sinai predicted.

"Our own forecast is for 3 percent to 4 percent inflation. The bond market projects 5 percent to 6 percent."

The battered oil and farming and mining areas of the country will not automatically see things getting better even if economic growth accelerates as expected. A lot of damage has been done and more is on the way.

Drabenstott argues that for many farm crops, surpluses are so large that prices may well keep declining. "All the signs are bearish," he says.

At the same time, however, the relatively generous federal support payments, which are tied to the land, have begun to lead some investors -- and most of them are already farmers -- to purchase land. Many farm experts, and surveys of agricultural lenders, indicate that the value of farm land may reach bottom sometime this year. The rate of decline has already slowed sharply.

The impact of the enormous cutbacks in oil and gas won't soon go away, either. Real estate prices in the Southwest, in farm areas and in mining areas will continue to fall for another six months or a year, Sinai said. "That's a basic residue of deflation."

In concrete terms, so many families are defaulting on their mortgage payments in the Houston area that the Veterans Administration, which had guaranteed the payments, will end up owning up to 10,000 homes there by the end of the year, according to the House Veterans Affairs Committee. The Federal National Mortgage Association, better known as Fannie Mae, already has been stuck with nearly that many.

Nevertheless, in booming Boston and in many other parts of the nation, demand for homes is so strong that prices are rising rapidly. Gramley, for instance, expects average single-family house prices to be rising at a 10 percent annual rate soon.

With home prices rising -- residential real estate holds the largest store of wealth owned by most households -- employe compensation rising at about a 4 percent rate and other regions benefiting from the lower prices being paid for many commodities, the spectre of deflation and depression remains a remote possibility.