It was an inning that showed you exactly where the Mets are at these days and why, when they should be concerned about their immediate future, they’re heading to Los Angeles bursting with new-found confidence.

The fourth inning at Citi Field against the Tigers on Sunday afternoon showed why the Mets have clawed their way back to .500 for the season after a rejuvenating 6-1 homestand.

The Mets were down 3-0 entering that fourth inning, but scored four runs to seal a 4-3 victory and level their record at 26-26.

A three-run blast by second baseman Adeiny Hechavarria did the most damage and added to the list of unexpected heroes who are helping the Mets survive a rash of injuries.

“Whenever you can help the team in any way it feels good,” said Hechavarria, who has replaced the injured Robinson Cano at second base. “That’s what we’re here for.”

It was Hechavarria’s three-run homer off Tigers starter Spencer Turnbull that provided the margin of victory, though there were other key contributors. Mets starter Zack Wheeler allowed three runs over the first three innings then settled down to complete seven innings of quality work before Jeurys Familia took care of the eighth and Edwin Diaz closed it in the ninth. And there was that marvelous push-bunt through a shifted infield by veteran Todd Frazier that scored Dominic Smith with the first run of the fourth inning and helped set the table for Hechavarria.

“It impressed me,” Hechavarria said of Frazier’s bunt through a vacant right side of the infield. “I asked him about it and he said it’s the first time he’s ever bunted before. I thanked him because it was another run I was able to drive in.”

That’s the thing about the fourth inning. It was about doing whatever it took to win the game. Smith, who had two hits and displayed some nifty work at first base, led off the inning with a double to right center. One out later, hot-hitting catcher Wilson Ramos singled to left, putting runners on the corner.

Frazier’s bunt took the Tigers by surprise and scored Smith, and after Carlos Gomez struck out, Hechavarria hit an 0-1 pitch over the opposite-field wall. It was his second homer of the series and the season.

“I’m not a power hitter,” Hechavarria said through a translator. “But today it happened to go out. I just try do my job and help the team in any way possible.”

A double by Smith, a run-scoring bunt by Frazier and an unlikely homer by Hechavarria were enough to beat the Tigers as the Mets welcomed back Michael Conforto, but are still without key players Cano, Jeff McNeil and Brandon Nimmo.

“It shows how selfless this team is and how anybody on this roster wants to do anything it takes to win,” Smith said, adding, “It shows how deep this roster is and the capability of this team.”

With Cano out indefinitely with a pulled quad, Hechavarria will see plenty of playing time, and production at the plate will be vital going forward.

“It’s an important job for me because we all know what kind of player Robinson Cano is,” Hechavarria said.

Known for his emphatic bat flips when he goes long, Hechavarria simply dropped his bat on Sunday and enjoyed his tour of the bases. He falls in line with other bench players who had clutch home runs during the homestand, including Gomez, Tomas Nido and Rajai Davis, who was designated for assignment before Sunday’s game to make room for Conforto.

“It important for us to contribute because that’s what we’re focused on doing,” Hechavarria said. “We came up for a specific reason whether it’s hitting or running or making a defensive play off the bench. I’m here to make a contribution any way possible.”

The fourth inning proved those contributions can come in unexpected ways.