With the end of his career just weeks away, CC Sabathia is trying to make the most of his time left with the Yankees.

“Hopefully we’ll win the division and roll into the playoffs,” Sabathia said Monday, a day before the Yankees’ final homestand of the regular season is set to begin. “Once you get to October, none of that, ‘How does your body feel?’ really matters.”

The left-hander is hoping for a few more weeks of his right knee allowing him to stay on the mound, with a chance to go out with another World Series.

But he said his final year has already gone better than he anticipated — especially after undergoing a heart procedure in December.

“It’s been a lot more,” Sabathia said at the LegaCCy Gala held on behalf of his PitCChin Foundation at Hudson Yards.

“I didn’t know how I was gonna be able to pitch coming off the heart stint,” Sabathia said of his offseason scare. “I didn’t know my body was gonna hold up. It’s done pretty good. … Just getting to the end of the season, laying in that [hospital bed] in December, I didn’t know if I was gonna be able to pitch again. So to be able to get 3,000 strikeouts, 250 wins and have a chance to pitch in the postseason is great.”

Regardless of what happens, both Carlos Beltran and Gary Sheffield said Sabathia will wind up in the Hall of Fame.

“Hopefully he wins the World Series,” Beltran said. “That’s a beautiful way to leave baseball. … I do believe he’s a Hall of Famer.”

“Without any question,” Sheffield said. “He carried the Brewers, he carried the Indians and when he first got here, he carried the Yankees.”