BOSTON — Russell Martin homered twice on June 10, finishing off a sweep of the Mets with a leadoff, game-ending blast in the ninth inning.

That was four weeks, one humongous slump and — perhaps — many, many, many millions of dollars ago for the looming free agent.

After that game, Martin actually proclaimed, “I am starting to feel dangerous at the plate.”

He said he believed he had mended a glitch that had made him susceptible to being jammed. The two homers against the Mets gave him five homers, 11 RBIs and 1.092 OPS in his last 17 games. His overall .216 average did not look impressive, but was his season high.

And then Martin began to hit like a pitcher — a particularly bad-hitting pitcher.

Friday night, as the Yankees generated 14 hits in a 10-8 victory over the Red Sox at Fenway Park, Martin again had none. His 0-for-3 extended his hitless streak to 30 at-bats — the longest by a Yankees since Derek Jeter and Jason Giambi both had 0-for-32 stretches in 2004. Overall, Martin is in a 4-for-57 slump.

His season average is down to .176 in 240 plate appearances. The worst average by a Yankee who came to the plate at least 450 times was the .193 of Jerry Kenney in 1970.

In other words, Martin is in danger of making history, and not the kind any player wants to make — especially in his walk year.

Martin turned down a Yankees overture in the offseason believed to be in the three-year, $24 million range and bet on himself.

Now he has the second half to better cash in on that bet. There is a dearth of quality catching available and teams will appreciate many things about Martin: 1) How athletic he is behind the plate. 2) His reputation for really putting in the prep time to work well with pitchers. 3) That he doesn’t turn 30 until February.

Nevertheless, it is going to be hard for Martin to even replicate the $24 million if he cannot get over the Mendoza Line, if he cannot rebound to hit for impact with more consistency in the second half of the season.

“I really don’t think about that,” Martin said of his free agency. “I really am trying to concentrate on winning as many games as possible.”

Still, Joe Girardi is concerned human nature being human nature, Martin will look up each at-bat, see his average on the scoreboard and overreact.

“I worry about him trying to make up for what happened in the first 81 games,” the Yankees manager said.

Martin insisted he’s “feeling great.” and that health has nothing to do with his prolonged doldrums. Nevertheless, he missed three games from July 24-26 with a stiff back and hitting coach Kevin Long said the aches have not dissipated enough for Martin to go through the extra batting practice necessary to shake the slump.

“He needs to grind right now,” Long said. “And he is not able to grind.”

Long’s hope is the All-Star break rest will provide a respite that will rejuvenate Martin.

“I really feel like I am one good swing away from getting back,” he said.