Jacob deGrom may have saved the Mets again without even taking the mound.

The ace will toe the rubber Thursday, trying to avoid a sweep against the Cubs in a critical game, but recently offered some advice that could be key to the Mets getting back the Edwin Diaz they need.

Diaz struck out the side in the Mets’ 10-7 loss to the Cubs on Wednesday night at Citi Field, flashing a wipeout slider that had often gone missing in his season gone wrong. He has started using deGrom’s grip on the pitch, and it accounted for two of the three strikeouts he had in the eighth inning — the other came on a 99 mph fastball — including three straight strikes to Kris Bryant to finish the frame.

“Diaz was the best I’ve ever seen him,” manager Mickey Callaway said. “That slider was real.”

At a recent early workout with pitching coach Phil Regan and bullpen coach Ricky Bones, deGrom was also around, and Diaz asked him to how he threw his slider. He began practicing it and has since grown comfortable throwing it.

“I think going forward, if I can throw my slider the way that I was throwing it tonight, I think I can have a lot of success,” Diaz said through an interpreter. “The last five, six or seven outings I’ve had, my slider has been there.”

In his previous outing Saturday, Diaz had left the mound with a trainer due to trap tightness. He gave up two runs on a walk and a hit while only recording one out before exiting. But he threw off the mound before Tuesday’s game and felt good, making him available for a bounce-back outing Wednesday.

The injury scare was the latest setback for Diaz, who owns a 5.44 ERA and has recently surrendered closing duties to Seth Lugo. But if the new slider grip can help bring back the Diaz of old — the one who posted a 1.96 ERA last year with the Mariners — it will be a huge weapon for the Mets’ bullpen down the stretch.

“I think [the grip is] a little bit tighter,” Diaz said. “With the old grip, the ball was staying over the plate. This feels a lot better. I’m able to locate it better.”

Diaz was part of a bullpen Wednesday that combined to toss six scoreless innings in relief of Noah Syndergaard, giving the Mets a chance to come back, even though it never fully materialized.

“I’ve had a lot of good days this season,” Diaz said, “but I think today was the day that felt like a complete day where I was able to have full control on the mound,” he said.

— Additional reporting by Dan Martin

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.