Choking on dead fish isn’t the way you want to expire, but here are the Mets, down to their last breath because of such reckless action.

For all the grit and resiliency the Mets have shown in 2019, they needed perfection and a prayer on this final homestand. The perfection part eluded them with an 8-4 loss to the Marlins on Monday.

The Mets’ tragic number in the NL wild-card race fell to two because of Washington’s victory over Philadelphia. The Mets have six games remaining and trail Milwaukee by five for the second wild card. Fangraphs placed the Mets’ postseason odds at 0.3 percent following the loss.

“Nothing is impossible for us,” Amed Rosario said. “The emotions are so high in this clubhouse that we still think we could make something happen.”

All equations placing the Mets into serious wild-card contention in this final week counted on them sweeping these 101-loss Marlins in four games. But Steven Matz produced one of his ugliest starts of the season, and the Marlins tacked on two runs in the seventh, when reliever Brad Brach was late covering first base on a grounder to Pete Alonso. The play was originally ruled an out on Harold Ramirez, but the Marlins won a challenge overturning the call, and the runners were placed by the umpires as such that two scored.

“I kind of slowed up a little to catch [Alonso’s throw], and when I looked up, Ramirez was there,” Brach said, noting that he should have spun and thrown home immediately, but didn’t because he believed the inning was over with the out call.

Rosario had answered Jorge Alfaro’s grand slam in the sixth with his own bases-loaded blast in the inning that pulled the Mets within 6-4 and resurrected the small crowd, announced at 21,189. But the Mets went quietly in the late innings in losing for the second time in three games. The Mets had swept the Marlins in four games in their last visit to Citi Field, in early August. That destruction came during a 15-1 stretch that transformed a lost Mets season into a meaningful September.

In a big spot, Matz wilted. He lasted five-plus innings and surrendered six earned runs on nine hits with three strikeouts. It followed a disastrous start in Colorado last week in which Matz allowed seven runs over four innings.

Part of manager Mickey Callaway’s rationale for flipping Matz and Marcus Stroman in the rotation was to allow his lefty the comfort of pitching at home, where he had pitched to a 1.94 ERA this season. Stroman pitched Sunday in Cincinnati instead and allowed two earned runs over 4 ²/₃ innings before leaving with an upset stomach.

Alfaro’s grand slam in the sixth, his second homer of the night, buried the Mets in a 6-0 hole as Matz crouched in disgust before being removed from the game.

“I wanted to keep us in a position where we could win, give the guys a chance,” Matz said. “And with this year, we’ve always got a chance, but that was really a big blow.”

Juan Lagares singled to load the bases in the bottom of the inning after Michael Conforto walked. Rosario then smashed his second grand slam of the season. The rally began with Todd Frazier’s single against lefty Caleb Smith.

Matz had induced double plays in the previous two innings to escape, after Miguel Rojas’ two-out RBI single in the third gave the Marlins a 2-0 lead.

Once the Mets are officially eliminated from the postseason, they will be left to play for personal milestones. Jacob deGrom, who is scheduled to pitch Wednesday, could be the front runner to win a second straight NL Cy Young award. There is also Alonso, who needs two homers to tie Aaron Judge’s rookie record of 52. Alonso is already the first rookie in MLB history with 50 homers and 30 doubles in the same season.

“We need to make another run at it,” Callaway said. “Never give up. I think that’s all this team knows how to do.”