It was just 3 1/2 years before the next New Hampshire presidential primary, and Sen. Gary Hart (D-Colo.), the winter book hero of '84, was back, surrounded by friends and autograph seekers. "Ga-ry, Ga-ry, Ga-ry," the crowd at the state Democratic convention chanted.

"Hart could run for governor here and win," said Dan Calegari, Hart's former New Hampshire field coordinator. "There is a whole group of us who are ready, willing and waiting for '88. Gary Hart redefined the Democratic Party for us. He was just a little early for the country."

Hart is discouraging such talk these days. He has joined the Walter F. Mondale team and is stumping the country for the Democratic nominee with a vigor that would surprise Hart's detractors.

He has campaigned almost nonstop for Mondale since Labor Day, visiting 41 cities in 17 states. He is to visit 10 more states before the end of the month.

It is hard to imagine a defeated primary candidate acting more like a team player.

Hart is out trying to prove his party credentials. He knows there are those who thought that he would retreat inward and sulk after the Democratic National Convention. Others have done just that. Defeat is a bitter medicine.

Those people "didn't know who I was," Hart said in an interview. "When it's over you just don't go home and sulk. Part of the reason you run for president is to become a leader of your party. You can't be a party leader if, having not gotten the nomination, you go home and stay there. People in the party want voices. They want leadership to tell them what to do and why it is important."

The Hart on the trail this fall is different from the frustrated, uptight candidate the country saw a few months ago. He is looser, seems more at ease with himself.

He jokes about himself and his supporters.

He told a crowd here, for example, that his son, John, 18, has gone to college and "is practicing to be a Yuppie so he can join all of you." Later, choking up with emotion during a meeting with some of his most loyal New Hampshire supporters, Hart abruptly ended a speech saying, "I don't want to lose my image of having a cool and aloof attitude."

In launching a harsh attack on President Reagan last week, Hart, referring to a flap over his birth date, said: "In my 47 years, or is it 46 . . . . The only thing I have in common with President Reagan is that I can't keep the basic facts straight."

Gone are the television cameras, the Secret Service agents, the motorcades, the balloons and the sirens. Only longtime aide Bill Shore travels with him. "It's lonely out here," Hart tells a reporter.

His mission is to rally the old Hart troops to Mondale, especially in the primary states that he won in New England and the West. "I'm here with one message: Ronald Reagan doesn't deserve your support; Walter Mondale does," he told the Democratic convention here.

"I hope you don't accept the wisdom that this race is over, that Ronald Reagan is going to get four more years in the White House and that it doesn't matter what you do. It does matter," he said at another gathering. "Even the margin matters. So when people tell you, 'I'm not going to vote,' tell them, 'shame on you,' " he said.

Hart has used his trips to thank supporters and begin raising money to erase the $4 million debt left from his campaign.

Hart supporters say they believe that Hart is positioning himself for the future. "If Mondale loses, there will be some real soul-searching done in the Democratic Party and a battle over who captures the soul," said Kevin Burke, Hart's Massachusetts co-chairman. "Gary Hart has a leg up on that one."

Hart tries to avoid talking about the future. He let it be known in Colorado that people should assume he will run for reelection to the Senate in 1986 unless they hear otherwise from him. And he says it is too early to talk about 1988.

"I don't expect to be doing anything in '88 but helping Walter Mondale get reelected," he said in an interview.

But what if Mondale loses?

Hart says he believes that the Democratic Party would be led by "some kind of supreme soviet" until 1988. He clearly wants to be part of it. "I can't just quit because I didn't get the nomination," he said. "I'm interested in ideas and issues. I'm not in politics to hold office but to change things, and ideas change things."

If Mondale were to lose, 1988 could see a new crop of Democratic presidential contenders. But what Hart has that newcomers lack is a corps of organized supporters and a demonstrated ability to appeal to independent-minded young voters. Many of his backers feel a good number of these people will vote for Reagan.

"What Reagan has told these people is: 'Don't feel guilty about success,' " said Burke, who is district attorney in Essex County, Mass. "That has a lot of appeal to people like me who've grown up in the suburbs and done all right for themselves. Mondale has tried to put everyone on a tremendous guilt trip. There's no pleasure in it. It's like you're left out if you're not a member of a minority group or a labor union."

For the moment, Hart is trying to quell such talk. He is telling anyone willing to listen that he and Mondale agree on fundamental principles and that Mondale's election would result in a rebirth of the Democratic Party.

He has developed a surprising empathy with Mondale. His own campaign "is passed, all passed," Hart said. He is openly critical of party leaders who helped Mondale get the nomination and are now second-guessing him.

When such criticism peaked in mid-September, Hart said he telephoned Mondale with advice. "I told him, 'Don't pay any attention to any advice. Do what you're comfortable with . . . . Forget all the sidewalk superintendents in Washington.' "