New York Gov. Hugh L. Carey has two opponents in Tuesday's Democratic primary, but it is widely acknowledged that the race boils down to Carey vs. Carey.

The governor swept into office four years ago with the largest majority in New York history after beginning his campaign so little-known that newspapers initially dubbed him "Hughie Who".

Midway through his term, Carey was still considered one of the Democratic Party's comers, and was mentioned as a vice presidential or even a future presidential candidate.

But the Carey image began to disintegrate both with Democratic politicians and the public as the governor turned his back on many of his early supporters and developed the style of a loner given to angry outbursts and erratic, though sometimes brilliant, leadership.

For Carey, in the unusual position of an incumbent opposed in his primary while his Republican opponent faces no challenge, the task has been to persuade voters that he is the Carey who won their hearts in 1974, not the governor who turned many of them off in the intervening years.

It is emblematic of Carey's problems that his primary opponents, Lt. Gov. Mary Anne Krupsak and state Sen. Jeremiah Bloom, were Carey supporters four years ago, and both launched their campaigns saying that they felf the governor had betrayed them.

Embarrassing as it may be for an incumbent to draw such charges and opposition from within his party. Carey appears a safe bet to win the primary.

A poll early this month by Roger Seasonwein, who built a record for accuracy during last year's mayoral campaign, gave Carey 45 percent of the vote, Krupsak 30 and Bloom 9, with the rest undecided in the New York area.

The pollster also showed Carey running slightly ahead of Republican Perry Duryea, the state assembly minority leader, whereas Duryea runs much more strongly than Krupsak.

Carey's primary campaign has been vastly better financed than his opponents, and he has tried to focus his television commercials on Duryea, pointing ahead to the general election, rather than giving Krupsak or Bloom a possible boost be mentioning them a serious contenders.

Neither Krupsak or Bloom has been able to afford much television advertising, and some political observers believe that a large portion of their voters will be anti-Carey votes.

After serving as Carey's lieutenant governor for four years and deciding to enter the primary at the last minute, Krupsak has had trouble finding any issue other than her dislike of Carey.

Bloom is "Jeremiah who" to most New Yorkers outside his native Brooklyn, but he has worked hard on a major difference between himself and Carey over the death penalty. Carey opposes it. Bloom and, according to public opinion polls, most New Yorkers, favor its restoration.

Duryea, who has also made his support for the death penalty a major issue in his campaign, hopes the Democratic primary provides him with another issue.

If Carey receives only around half the primary votes, the Republicans will try to woo voters, pointing out that the governor has strong opposition even in his own party.

David Garth, the media consultant who runs Carey's campaign, says he believes that is a van hope.

"The day after the primary, it's over. The Democrats in New York will fight within their own house, but after the primary they'll all pull together," Garth said.

Garth said the New York City newspaper strike has hurt Carey badly. Although the papers are not publishing, The New York Times and Daily News have announced that they endorse Carey, "Those endorsements would mean a lot," Garth said.

He also laments the lack of coverage in the city, where as many as 70 percent of the state's primary votes are cast.

Thursday night, Carey went to the huge housing complex Co-op City in the north Bronx, where crime and the cost of living are major issues. Carey was bood when he entered, and got an ovation after his speech, Garth said, "That would have been a natural for the papers," Garth said.

Garth claims that Carey would have gotten 70 percent of the vote if his last month of active campaigning had been covered in the papers. As it is, Garth said, "I always worry, but I think he'll get 50 or 55 percent.

Carey's campaign has concentrated on his actions to prevent New York City's financial collapse. Not even his opponents challenge his claims as one of the principal saviors of the city, and one of Garth's television commercials features Mayor Edward Koch and City Council President Carol Bellamy (two former garth clients) reminding New Yorkers of the governor's role in the fiscal crisis.

Carey's reelection effort has brought him back from a dismal low point in public opinion polls four months ago, and often his supporters back Carey with ambivalence.

The weekly Village Voice, for example, endorsed Carey with "grave reservations."

"It is Carey versus Carey," Garth said, "and I think Carey's going to win."