PRESIDENT CARTER'S three January messages reflects, this year, a somber and embattled frame of mind. The tone is pessimistic. The central subjects are oil and military defense, two preoccupations that intersected in the State of the Union address last week when he warned that the United States would use force to defend its vital interest in the Persian Gulf. Oil and its soaring price are chiefly responsible for the acceleration of inflation over the past year, he said, and it has a lot to do with the recession that he foresees.Those are the ideas that form both the Budget Message and the Economic Message that appeared this week.

Budget and economic policy is now, in Mr. Carter's view, largely a matter of damage control. The over-riding aims are to keep inflation from gettig worse, and to mitigate the worst effects of rising unemployment among the young, and to diminish dependence on forein oil. The aim is, further, to end the decline in other government's estimation of American military power.

A year ago Mr. Carter was all positive thinking and determined good cheer. His State of the Union message asserted a "new foundation" in national values; it was notable mainly for its omission of any serious discussion of energy. Last year's Economic Message opened with a briskly self-congratulatiory passage on rising employment, rising profits and rising incomes. The task would be, he said, "to sustain prosperity and extend its benefits more widely." This year, the message begins with a bleak description of the doubling of oil prices and its effects on the world's economy.

It's instructive to see that this year's bleak messages seem to have raised Mr. Carter's political standing. In January 1979, as he was talking about rising wealth and sustaned prosperity, most other people were worrying about a coming recession or, at best, very low economic growth. The leap-frog pattern in oil pricing was already becoming visible, and the Iranian revolution was rapidly gathering momentum.

That context gave last year's message an un-serious air -- a quality of not quite conscious avoidance of certain unpleasant possibilites. This year, most Americans seen to give Mr. Carter credti for talking about the same world they think they are living in.

But it is possible for Americans, including Mr. Carter, to talk themselves into a state of paralysis in which everything seems insoluble. The perils that the president describes, particulary in the Economic Message, are larger and more immediate than the responses that he has devised. He perceives the need to slow down inflation. To accomplish that, he intends to rely on tight fiscal policy and the wage-price guidelines. But fiscal policy is running rather loose at the moment, with the budget defict having crept back up to $40 billion this year, and the guidelines are much too rubbery to take much pleasure. Mr. Carter sees the need to reduce oil imports, but the means of doing it will take a decade to become fully effective.

There is a disparity between diagnosis and prescription. If Mr. Carter's analysis of the economic prospect is correct -- and this year he seems to have it just about right -- then there is a clear requirement to do much more about both inflation and oil imports than the president is yet prepared to contemplate.