Todd Frazier is likely playing out his final weeks in a Mets uniform and faces an uncertain future as a 33-year-old third baseman headed to free agency.

So there might not be anybody in the Mets clubhouse with a stronger determination these days than Frazier, who desperately wants to help his team reach the postseason while showing he’s worthy of a job in 2020, as many organizations move toward younger, inexpensive players.

Nights like Tuesday serve as a good talking point for Frazier, who delivered two doubles that drove in three runs in this 3-2 Mets victory over the Diamondbacks at Citi Field.

Against the odds, the Mets received six outs from Brad Brach and Justin Wilson without surrendering the lead. That included Wilson striking out this ballpark’s ninth-inning king, Wilmer Flores, with the tying run at third base after Pete Alonso had smothered Ketel Marte’s grounder and stepped on first base for the second out, forgoing a rundown with Tim Locastro who initially retreated toward the bag. Alonso held lead-runner Nick Ahmed at third, allowing Wilson to live for another batter with the lead.

Mickey Callaway’s bullpen formula had worked, the same way his idea of inserting Frazier into the starting lineup had paid dividends. The grumbles from fans who wanted J.D. Davis in the lineup instead were silenced as Frazier stroked a two-run double against Zac Gallan in the second inning that put the Mets ahead. In the fourth it was Frazier again, with a ball that caromed off the left-field fence for a double that gave the Mets their third run.

“[Frazier] has been swinging the bat great,” Callaway said. “He didn’t play the last two days because J.D. deserves to play, too. I thought [Monday] night when J.D. was swinging the bat he looked a little tired and run down and he is going to get that way sometimes. We have nine, 10 games in a row, they need off days, both of those guys.

“When Frazier is fresh, when he gets a couple of days off, he usually swings the bat pretty good. He did a great job. He won the game. He got three RBIs.”

This version of Frazier has surfaced throughout the season, oftentimes after he’s been discounted by fans and media. Just when Frazier appears finished, he resurfaces. Before Tuesday, there was a game in Philadelphia about 1 ½ weeks earlier in which Frazier smacked two home runs and drove in six in the final two innings alone. He is the ultimate feast-or-famine hitter.

Recently, more than ever, Callaway had a good excuse if he wanted to bury Frazier on the bench for good. Brandon Nimmo’s return from the injured list has meant Jeff McNeil can play third base every day if Callaway chooses, and there’s always Jed Lowrie as a switch-hitting option.

But there’s also something to be said for playing your best defensive option at the position, and Frazier brings that. He’s also been to the postseason with two different teams, making him unique in that regard among the players who were in the Mets’ starting lineup Tuesday.

“Everything is a playoff game,” Frazier said before the Cubs lost to the Padres enabling the Mets to move three games behind Chicago in the race for the second wild-card spot. “It’s pretty much lose and you will be trying to go back uphill to where you need to be. You don’t hope, but right now we’re in that hope phase because that’s really what we have to do. When we win a game we have to hope the other team loses and it’s really a tough situation to be in.”

Frazier looked finished in May, but then had a six-week stretch in which he helped carry the lineup. But just as there was buzz that Frazier, in the last year of his contract for a team that appeared going nowhere, might be trade material along with Jason Vargas, the third baseman stopped hitting. And yet, for much of July and August it was easy to overlook, as the Mets were crawling back into wild-card contention. But after the 15-1 stretch ended it became harder to hide Frazier’s shortcomings.

Lately, he’s been more like the player who helped carry the lineup earlier in the season. And with left-handed pitchers scheduled to face the Mets in the final two games of this series, there is a good chance we’ll see Frazier starting at third base at least once in the next two days.

Frazier likely will soon be looking for another job. But first there is the matter of finishing this one with the Mets.

Purchase event tickets to The Amazin’ 1969 New York Mets: A World Championship for the Ages presented by The Paley Center for Media and New York Post. Enter promo code: NYPOST to unlock tickets only available for Post readers.