Commercial banks are taking their biggest bath in red ink ever, a result of their efforts to deal with shaky loans to Third-World borrowers.

Two large banking companies, Chase Manhattan Corp. and First Chicago Corp., yesterday announced losses for the second quarter totaling more than $2 billion. By the time the flood is over, the five largest bank companies in the country are expected to have posted losses of nearly $7 billion, principally because of accounting moves related to loans to developing nations.

Chase Manhattan, one of the five, said it lost a record $1.4 billion in the second quarter, or $16.98 per share. First Chicago, the 11th-largest bank company, said it lost $698.3 million ($12.74 per share). Earlier, J.P. Morgan & Co., the fourth-largest bank, reported a loss of $586.4 million ($3.29 per share).

Before this year, the largest bank loss ever recorded was $1.1 billion, at Continental Illinois in the second quarter of 1984.

And even as a proportion of assets, the projected losses are comparable to those experienced during the Great Depression, although the overall financial health of the banking industry is far better than it was then.

Numerous banks across the country had alerted the financial markets weeks ago that they would suffer significant losses in the second quarter because of their decisions to recognize that Third-World borrowers will not repay their loans in full. Regulators and financial analysts generally hailed the banks' actions to increase their reserves for potential loan losses. Yesterday, the stocks of major bank companies closed slightly lower.

But even though the losses were expected, they served to underscore the fact that five years after the Third-World debt crisis began there is little indication that lenders and borrowers are close to a solution. Latin America today owes more than $300 billion to its commercial creditors, an amount that has grown since the crisis erupted in August 1982.

In recent weeks, banks have nearly fully funded a $1.97 billion package of new loans and refinancings of existing loans for Argentina. But Brazil, the largest Third-World debtor, still has not resumed payments on the $68 billion it owes to commercial banks. Recently, it also suspended principal payments on $1.05 billion it owes to foreign governments and other official lenders.

The large bank losses that will be announced this week and next are being caused mainly by the decision in late May and early June by Citicorp and other major banks to sharply raise the amounts set aside in loan-loss reserves to cover debts that may go bad.

At the time, Citicorp -- which often is the lead bank in dealing with debtor nations -- said the move would result in a second-quarter loss of $2.5 billion, and a spokesman said yesterday that little change is expected when the official figure is announced next week.

Other major banks also said yesterday that their losses would be similar to the levels they projected earlier. BankAmerica Corp. has said it will lose $1 billion in the second quarter, and Manufacturers Hanover Corp. also forecast a loss of $1.05 billion because of reserve increases.

Additions to loan-loss reserves go into a pool of funds covering loans that go bad. When a bank increases its reserves, it is in effect admitting that more of its loans will not be repaid. When the debtor defaults, the bank writes the loan off and there is no effect on earnings.

Without the reserve increases, most banks would have made money in the second quarter, and analysts doubted that the announcement of the expected losses would put much downward pressure on stock prices.

"It has already had an impact: the markets have accepted the flood of red ink rather well so far," said James McDermott, research director for the Wall Street firm of Keefe Bruyette & Woods Inc. "The key thing is to look at earnings normalized, what they would have shown if they had not taken the reserves."

Chase, for instance, would have shown a profit of $122 million in the quarter. In the second quarter of 1986, the bank company earned $146 million. First Chicago would have earned $55 million without the loan-loss provision. In the same quarter last year, it earned $63.6 million.

A recent analysis by another investment firm, Salomon Brothers, also praised the additions to reserves despite the impact on earnings, but noted that banks still needed to adjust their long-term strategy in dealing with debtor nations.

Some analysts said investors were likely to be less sanguine in the future if banks have to add still more to reserves. "The question is going to be whether they have to do it again," said banking expert Robert Sloan, a Washington lawyer. "And debtors are going to start thinking {that} since these reserves have been taken they can treat their debt as if some of it had been forgiven."