BOSTON – One of the biggest disappointments in David Wells’ career was getting traded from the Yankees before the 1999 season. Wells bitterly lamented that he wasn’t part of the club that defended a World Series title.

But if the 42-year-old lefty helps the Red Sox repeat this October, he told The Post he wouldn’t pitch another game.

“It means I can retire and go home,” Wells said. “If we win … that would be a storybook ending right there.

“Give that money they owe me next year, give it to a young guy. There’s a couple of guys here pretty deserving. That would be a great finish.”

Wells (14-7, 4.47) is prone to outrageous statements. But this one might have validity. He’s already said he probably needs offseason surgery on his knee, and told The Post he dreams of riding “off into the sunset.”

He starts the opener of the do-or-die series with the Yankees tomorrow night that will in part determine Boston’s playoff fate.

He claimed he’s moved on from his two stints with the Bombers (he was there from 1997-98 and returned from 2002-03). More to the point, he knows he’s persona non grata at Yankee Stadium.

“I know as long as Joe Torre’s there, I won’t be welcome,” Wells said. “That’s for damn sure.

“I knew I had no chance of going back there as long as he was manager. I just found that out.”

“If that’s the way people feel, I’m not going to lose any sleep over it. I had a good time. My ride there was fun. I didn’t want to leave. They got rid of me.

“As they say, hang with ’em.”

After the Sox bid adieu to Pedro Martinez and Derek Lowe this year, the hefty lefty was signed to a two-year contract worth as much as $8.15 million combined. But it was based largely on the number of starts and innings Wells could give the team, and critics bashed the signing. He’s made 29 starts and thrown 177 innings.

On Monday, David Ortiz said the Sox weren’t better than last year’s club, in part because they’re missing Martinez and Lowe.

“I’m having a decent year. Matt [Clement] is having a pretty good year. So there you go. You balance those two out. I think we’ve been even better.”

Martinez (15-8, 2.82 ERA) was worth the money, while Lowe (12-14, 3.63) wasn’t. Clement (13-6, 4.50) was an All-Star, while Wells has been better in the second half.

“If these people are gonna have favorites, [bleep] it, turn the page,” Wells said. “Or go to management or go to ownership and bring them back. I could care less.”

Wells is 2-2 with a 4.26 ERA against the Yanks, and he said he lives for starts like the one tomorrow night.

“For me to go out there and pitch at this level in a high-intensity game, that’s what it’s all about,” he said. “Because I’m not afraid to fail. If you’re afraid to pitch in a big game, you know what? [Bleep] it. Go home. “