President Carter Yesterday pledged to seek increased U.S. military strength as his top foreign policy priority in his fourth year in office even as the White House was seeking to cool public fears that the United States is heading for a war with the Soviet Union.

A senior White House official, briefing reporters on a written version of the president's State of the Union message that was sent to Congress yesterday, said that despite the gravity of the Soviet invasion of Afghanistan, a sense of balance is crucial in the U.S. response.

Carter is expected to announce a new dimension of that response tomorrow night in the traditional State of the Union address to Congress. White House officials said the speech will center on the international crisis in Iran and Afghanistan that have commanded the president's attention for nearly three months.

"I think we should be very careful to avoid an excessive emotional crisis atmosphere. We should avoid creating the impression that we are on the brink of some massive military confrontation," said the senior White House aide in the news briefing.

The Soviets actions, so close to the oil-rich Persian Gulf, threaten America's vital interests, he said, and the Kremlin must be made to understand this and that the United States will protect those interests.

But that should be done with what the aide called "a long, sustained and measured response" and "not a wave of hysteria, not bugle calls for massive, all-out national mobilization for. . . total confrontation."

The cautionary statements appeared to reflect White House concern about the growing belief among portions of the public and some commentators that the United States is headed into a war with the Soviet Union as a result of the crises in Southwest Asia. While Carter repeatedly has called the Soviet invasion of Afghanistan the most serious threat to world peace since World War II, senior policymakers continue to say they do not believe a military conflict between the two superpowers is on the horizon.

In his message, Carter identified three aspects of the rapidly changing international scene as the focus of urgent attention.

"The steady growth and increased projection abroad of Soviet military power." This projection into Afghanistan in the past four weeks has brought a renewal of East-West tensions and a crisis atmosphere in many world capitals.

"The overwhelming dependence of western nations, which now increasingly includes the United States, on vital oil supplies from the Middle East."

The pressures of change in many nations of the developing world, including the year-old revolution in Iran and uncertainty about the future in many other countries."

The convergence of those three elements in the greater Middle East, especially in the area of the Persian Gulf and Indian Ocean, contributed to what Carter called "some of the most serious challenges in the history of this nation."

He stressed the importance of Persian Gulf oil supplies to the United States and its allies. "The denial of these oil supplies -- to us or to others -- would threaten our security and provoke an economic crisis greater than that of the Great Depression 50 years ago, with a fundamental change in the way we live," the president said.

Carter reported that the United States has begun to increase the capacity to project military power into the Persian Gulf region through increased use of military facilities in the area and an enlarged U.S. naval presence. Carter is expected to give more details on his plans for the future tomorrow night.

According to the senior official who briefed reporters, the United States is seeking to move toward a "regional security framework" in Southwest Asia that is different from a new string of military alliances but that he said would allow the United States to stand with threatened nations both military and politically.

The ability of U.S. forces to use bases or facilities in the region is considered vital to a sustained, large-scale American presence. In the pursuit of such facilities, the White House official said that the United States must be sensitive to the "mixed concerns" of nations in the area, which are not far removed from a colonial past and are not eager to be seen as American outposts.

Carter's list of priorites for Congress in the foreign affairs field was headed by military authorization and appropriation bills and a special bill to authorize emergency aid to Pakistan.

In a reversal of previous emphasis the SALT II accord with the Soviet Union was last on the list and marked for action "when appropriate." Carter asked the Senate to postpone debate on ratification of the treaty, previously his number one priority, after the Afghanistan invasion.

"We must pay whatever price is required to remain the strongest nation in the world," Carter said. "The price has increased as the military power of our major adversary has grown and its readiness to use that power has been made all too evident in Afghanistan."

Carter said his military program for the coming fiscal year will call for funding authority of $158 billion, an increase of more than 5 percent over his request for the current year, adjusted for inflation. He said sustaining this growth rate for defense over the next five years will require sacrifice -- "but sacrifice we can well afford.

Regarding Irana, Carter said that "we have no basic quarrel with the nation, the revolution or the people of Iran." He said the continued captivity of U.S. diplomatic personnel there is uppermost in the minds of American officials and the American people, and that it stands in the way of potentially "new and mutually beneficial relationship" between the two countries.

The president warned again that the hostages "must be released unharmed." Carter declares that, while the United States thus far has pursued a measured and peaceful course, our patience is not unlimited and our concern for the well-being of our fellow citizens grows every day."