SAN FRANCISCO — When New York City began closing in on Aubrey Huff — lights and noise filling his hotel room through drawn curtains in the early-morning hours of a Sunday last April — he knew that something was wrong. A chilly dawn was breaking across Manhattan, but Huff had been up for hours fretting about his career, his splintering marriage, the game he had just played. His heart raced, then raced some more. Panic set in.

“If I’m going to die,” he thought, “I’m not going to die in this hotel room.”

The type of mania that can lead a healthy man to believe that he is having a fatal heart attack twisted Huff’s judgment. Within hours, he was AWOL from the San Francisco Giants, on a flight home to Tampa, Fla., his coat pulled over his head for the duration of the trip. He texted Manager Bruce Bochy about a family emergency, slipped into his house and tried to sleep it off.

This was not the beginning of Huff’s disastrous 2012 season, which included a freakish injury and a stunning statistical free fall, nor was it the end. It was merely the most dramatic point. Much like the knee ailments that sidelined him for nearly three months and a performance that for long stretches was unworthy of a roster spot (let alone the two-year, $22 million contract he signed before last season), it is largely behind him.

The outsize frat-boy persona Huff brought to the Giants during their 2010 championship season toned down considerably. At 35, he is no longer the player who led that title team in homers and runs batted in, who finished seventh in the National League most valuable player voting. Last year, he batted .246 with 12 home runs. This season, he hit .192 with five extra-base hits. It is almost as if the Champagne shower from the Giants’ celebration in Arlington, Tex., washed away his mojo.