Bank of America, the nation's largest, yesterday forecast a "deep and serious recession" lasting through the middle of 1982 in the United States and followed--at best--by a relatively weak recovery later in the year.

But the grim predictions for this country's near-term future were coupled with a more optimistic view about economic conditions overseas. The impact of anti-inflation and moderate-growth policies in major developed nations should contribute to gradual world economic recovery in 1982, according to the San Francisco-based bank.

Like economists in general and the Reagan administration itself, Bank of America speaks with differing voices when trying to get a fix on the economic outlook. The bank's senior vice president for economic policy research differed in public here yesterday with his board chairman on the severity of the current recession, for example.

However, the two executives agreed that the administration is being too optimistic in its projections that domestic economic activity will not decline much after the current quarter and that the recovery will be stronger than the bank's economists see.

Economic policy chief John O. Wilson told reporters at a news conference here that the current recession--which by his figuring began in the first quarter of 1981--will last as long as the 16-month 1973-1975 slump, the worst since World War II, but that it "will not be as bad." The main factor arguing against a more severe decline this time is falling interest rates, which will allow some strengthening of demand for goods and services later next year, Wilson concluded.

His boss, BankAmerica Corp. Chairman Leland Prussia, has a somewhat more pessimistic view. Prussia predicts a "fairly bad" recession that will approach the mid-1970s decline because of big federal budget deficits and long-term weaknesses in such basic industries as housing and automobiles.

Asked about their differences, Wilson agreed that he is the more optimistic of the two. He noted that Prussia also is an economist and that he expects the chairman to speak out frequently with differing views, which Wilson termed a healthy diversity.

One disagreement yesterday was on the costs to the public of the current recession in terms of unemployment. Prussia told reporters in San Francisco that the jobless rate could spurt to 10 percent or more during one or two months in 1982, while Wilson's highest unemployment forecast was 8.9 percent in the April-June quarter, with an average jobless rate for the year of 8.7 percent.

Unemployment reached a postwar high of 9 percent near the end of the last major recession in 1975 and stood at 8.4 percent in November. The administration has projected that 9 percent would be the peak of the jobless rate in the current decline.

Bank of America also forecast yesterday that real gross national product (the output of goods and services of the overall economy, adjusted for inflation) will be down almost 6 percent in the October-December period this year and by 3 percent in the first quarter of 1982. At the same time, industrial production will be off 14 percent this quarter and down about 5 percent in the first three months next year, the bank said.