Jacob deGrom racked up another milestone in what was a wild night for both player and the New York Mets in the first game of the doubleheader against the Milwaukee Brewers on Wednesday.

In what was a marquee pitching matchup between deGrom and Corbin Burnes in the early game, the Mets ace endured a few rocky moments but eventually settled, while Jeff McNeil produced the first walk-off hit of his career to cap off a wild 4-3 comeback win.

There was excitement in the air at Citi Field as two All-Stars prepared for an all-time battle, although deGrom announced before the game that he would not be taking part in next week’s festivities in order to spend time with his family and recharge his batteries.

That’s good news for Mets fans who want their Hall of Fame bound starter as fresh as possible for the second-half of the season, and some well-deserved rest seemed a good idea after deGrom gave up a leadoff homer to Brewers third baseman Luis Urias.

It was a shocking turn of events that left Citi Field in stunned silence, although it wasn’t long before deGrom settled into a groove and got back to what he does best.

He retired the next 12 batters he faced, striking out six, and he reached 101 MPH in the fourth inning as his filthy stuff started to return.

With Burnes also off to a sluggish start before having his way with the Mets lineup, the game was perfectly balanced until the unthinkable happened when deGrom gave up his second home run of the day, a 426-foot towering home run to Jace Peterson.

It is rare to see deGrom allow one home run in a start, let alone two, and you couldn’t blame some for wondering if an All-Star curse was at play.

However, deGrom escaped the fifth without any further damage by striking out the next two batters, and he induced a double play in the sixth to escape unscathed after giving up a single.

Sitting on 69 pitches after the sixth , deGrom was allowed to finish what he started in the seventh and final inning, finishing the day with 10 strikeouts, no walks and just four hits allowed.

The two home runs stung but deGrom worked out of a rut and, like his teammates, showed an abundance of character to get the job done and take Game 1 of the double-header.

“I can’t say enough about this clubhouse and how we’re in every game, one swing away,” deGrom said after the game.

“We ended up grinding out a win today.”

deGrom also created more history in what will finish up as an all-time historic season for the ace, racking up his 1,500th career strikeout and becoming the second-fastest pitcher to reach that mark and just one game behind Yu Darvish (197).

It was still a solid outing for deGrom who will only benefit from not going to the All-Star Game, even though it would have been a lot of fun to see the two-time Cy Young winner mix it with the rest of MLB’s elite this season in Colorado.

Meanwhile, while deGrom and the Mets found a way to win earlier in the day, it was a different story in the second game of the double-header.

As the bats went quiet and failed to produce the same kind of heroics that won Game 1 in dramatic fashion, mustering just three hits in seven innings, Robert Stock did okay on the mound but it was in vain as he got no run support.

The 31-year-old veteran, making his first start for the Mets after being released by the Cubs in June, allowed just two runs and four hits while striking out five batters in four innings as New York lost 5-0.

Stock’s two runs allowed came on a two-run homer by Manny Pina in the second, but he threw 68 pitches and was the latest player to continue the next man up mentality that has somehow helped the Mets preserve a stellar 2.96 ERA, which is the lowest mark in MLB for a starting rotation, and an incredible run given how ravaged with injury this starting staff has been this season.

“He made some really good adjustments after going the first time through their lineup, and I thought that just his command was not there from the get-go in the game, but he was able to find his command with the secondary pitch especially and then that made the fastball play above the zone, or throwing out by swing,” Mets manager Luis Rojas said.

“So, he did a really good adjustment, he’s shown really good stuff.

“I’m glad we got him right now because we’re in need of that type of length.”

With the All-Star break now approaching, the Mets will start a run of seven straight games against the Pirates on Thursday with Taijuan Walker getting the start on the mound in Queens later, and it is a real opportunity for this team to fatten up their record heading into the second-half of the season.