HOW SHOULD the federal regulators deal with an insolvent savings and loan association? If there's only one insolvent S&L, it's simple. The government shuts it down immediately and uses public insurance funds where necessary to pay off depositors. But what if there are 431 insolvent S&Ls and the cost of shutting them down is well over twice the $6 billion in the federal S&L deposit insurance fund?

That's the situation in which the federal regulatory agency, the Home Loan Bank Board, found itself at the end of last year. Since then, both the number of insolvent associations and the cost of closing them have risen. There's no danger to insured depositors because -- unlike the state of Maryland -- the federal government has unlimited resources to pay. But the losses are far beyond the regulators' resources. Now it's up to the Reagan administration and Congress to decide how to handle them, and they are mounting rapidly.

The strains on the S&L industry originated at the beginning of this decade when interest rates soared. The associations' income was chiefly interest on mortgages extended years earlier at low rates, but to attract deposits they had to pay out much higher rates and they suffered huge losses. Now, at mid-decade, interest rates are lower and most S&Ls are both solvent and profitable again. But there is a substantial minority -- about one out of seven -- that is neither. Many of these troubled S&Ls are now taking increasingly high investment risks. Once an institution is insolvent, its owners have little to lose by gambling since their equity is already gone and further losses can only fall on the federal insurance fund.

The clearest evidence comes from a recent paper by four economists, James R. Barth of George Washington University, and Donald J. Bisenius, R. Dan Brumbaugh Jr. and Daniel Sauerhaft of the Bank Board's staff. Construction lending, for example, carries much higher risks than mortgage lending, and last year construction loans accounted for less than 6 percent of the loans in the industry as a whole -- but almost 25 percent of the loans of those institutions that doubled their size in one year. Deregulation, for another example, now allows S&Ls to go into direct investment. That means buying shares of other enterprises, and it can be much more profitable than lending fixed amounts for interest. But the risks are proportionate. In 1984 direct investment by the S&L industry almost doubled.

Some of these long-odds wagers pay off. But, as at the race track, most don't. That's why the losses are rapidly getting larger despite stable interest rates. And that's why it's dangerous to the federal government, and to the taxpayers, to leave insolvent S&Ls open for business.