WITH THE LOAN to Brazil, President Reagan has once again acted swiftly and wisely to help a Latin government under great financial strain. It's hardly charity. As in the case of Mexico last summer, this kind of lending benefits the United States as much as the borrower. The recovery of this country's economy will depend to an important degree on the good health of the Latin economies.

The $1.2 billion of credit that Mr. Reagan announced in Brasilia is what the bankers call a bridge loan -- a loan for a few months while more durable arrangements are negotiated. What's at the other end of the bridge? Staving off a disaster is not necessarily the same thing as providing a base for economic growth and solvency over the long haul.

Through the 1970s, Brazil maintained a phenomenal rate of economic growth, higher than Japan's. One ingredient, as in the United States a century ago, was foreign capital. But over the past couple of years the high interest rates have tremendously increased the cost of its past debt, while the worldwide recession has cut down the export earnings that pay off foreign loans.

There are now five Latin American countries whose foreign obligations this year, including both interest and principal, are substantially larger than their total export earnings. In order, they are Argentina, Mexico, Ecuador, Brazil and Chile. The Morgan Guaranty Trust Co. of New York, which keeps a careful and expert tally of these trends, recently published estimates that, in the case of Brazil, interest payments alone will come to 45 percent of the country's 1982 exports. Payments of principal due would be another 77 percent, but, since a country can't pay more than it earns, some payments will have to be postponed, and there will have to be more loans.

One lender of last resort is the International Monetary Fund, and that's why its member governments need to expand its lending resources promptly. The other lenders of last resort are the rich countries' central banks, of which the most powerful is the U.S. Federal Reserve System. The loan to Brazil was, among other things, a message to an apprehensive world that this network of lenders is in place, and in operation, to prevent default and panic.

Beyond that, it is crucial that the industrial countries fight off the protectionist impulse and keep their markets open to exports from countries like Brazil. If Brazil can't export to earn dollars, it has no hope of paying off its loans -- let alone continuing to buy American goods that represent American jobs. The short-term loans are emergency aid. Any longer solution depends on expanding trade.