Jacob deGrom #48 of the Mets leads his team on the...

Jacob deGrom #48 of the Mets leads his team on the field for Game 2 of their NL Wild Card Series against the San Diego Padres at Citi Field on Saturday, Oct. 8, 2022. Credit: Jim McIsaac

Jacob deGrom got what he wanted: an absurd, fully guaranteed five-year contract worth a ton of money to leave New York.

The Mets got what they needed: another team swooping in and signing deGrom to an absurd, fully guaranteed five-year contract worth a ton of money.

The reported dollars for the contract deGrom and the Texas Rangers agreed upon on Friday night are $185 million guaranteed with a sixth-year option that could push the pact to a cool $222 million.

Yes, it hurt Mets fans to lose deGrom in this shocking fashion. That’s an understandable emotional reaction to seeing one of the greatest pitchers of this generation (when healthy) leave your team to take his talents to the baseball wasteland known as Arlington, Texas.

But the unemotional reaction has to be this: If five years and $185 million is what it would have cost to keep him in Flushing, the Mets are better off without him.

Oh, we don’t mean the deGrom who won the NL Cy Young Award in 2018 and 2019 and pitched like this era’s Sandy Koufax when he was healthy enough to take the mound.

DeGrom at his best was truly a sight to behold, carving up the top hitters on the planet as if he were facing a bunch of Little Leaguers. It was breathtaking.

That he was a homegrown Met, and an easy guy to root for with his stick-figure frame, mischievous smile and 102-mph fastball, made it all the more special.

No, we mean the Mets are better off saying farewell to the deGrom who can’t be counted on to make 30 starts, or 20, or even 10, in any future season because of various injuries, and who will turn 35 on June 19.

Would any Las Vegas bookie take odds on whether deGrom will be healthy enough to pitch on that milestone birthday?

How about when the Rangers visit Citi Field next Aug. 28-30?

How about in 2027, the final guaranteed year of his new contract? Or 2028, the option year?

Could billionaire Mets owner Steve Cohen have matched the offer? Of course he could have, if given the chance. Cohen is a guy who in 2013 bought a Picasso painting for $155 million.

At his best, deGrom was as talented at his craft as Picasso was at his.

Picasso probably had his off nights, but he is estimated to have completed 13,500 paintings in his lifetime.

He took the brush every fifth day until his death at 91.

But DeGrom can’t be counted on to take the ball and paint his pitching masterpieces every fifth day. Not since the injuries (11 of them) started in July 2020.

Injuries limited deGrom to 12 starts (with a 2.38 ERA) in the COVID-shortened 2020 season, 15 starts in 2021 (with a 1.08 ERA) and 11 in the regular season and one in the playoffs in 2022.

DeGrom’s 2022 began on Aug. 2. After seven starts, he had a 1.06 ERA. It grew to 3.08 by the end of the regular season — still top-shelf but not otherworldly, and perhaps evidence that regular rotation work was taking a toll on his effectiveness.

Much has been said about how Aaron Judge bet on himself by turning down the Yankees’ $213.5 million extension offer before the 2022 season.

That is about to turn out very well for the American League single-season home run record-holder regardless of whether he re-signs with the Yankees.

But not as much has been said about deGrom’s gamble. Even with all his ailments, deGrom said in spring training that he was going to opt out of the final year of his Mets contract, which was worth $30.5 million.

Then he got hurt and missed the first four months of the season. Still, deGrom stuck to his opt-out guns. It apparently never crossed his mind that to earn a multiyear pact, he needed to prove beyond a shadow of a doubt that he was healthy.

He was right.

Take a bow, Jacob deGrom, for proving it only takes one desperate club.

Take a bow, Texas Rangers, for either the most brilliant or the most ridiculous contract in recent memory.

And take a bow, Steve Cohen and Co., for doing the right thing and letting deGrom go.

Newsday LogoSUBSCRIBEUnlimited Digital AccessOnly 25¢for 5 months