Neck spasms and a balky knee have hampered Mark Teixeira during a woeful 2016 season. And just when his bat bore any semblance of a hot one — in relative terms — the Yankees entered the All-Star break.

Then the former All-Star first baseman fouled a ball off his left foot Saturday, in the Yankees’ second game of the nominal second half. X-rays and a CT scan came back negative, but the soreness from the impact kept Teixeira out of the lineup for the series finale against Boston and the first two games with Baltimore.

“This has been brutal,” Teixeira said Wednesday before returning and going 1-for-2 with a homer and two RBIs in the Yankees’ fourth straight win, 5-0, over Baltimore. His slash line is .189/.271/.320 this season. “I’ve been terrible, and the only thing I can do is, the last two months, try to be healthy and get hot. I live off my hot streaks, and I haven’t had one yet this year.”

One game cannot serve as a sure indicator that a player is about to go on a tear. But Teixeira, who hit .235 with four home runs in 51 at-bats between returning from the disabled list June 25 and the end of the first half, said it can be a springboard.

He and the Yankees hope that is the case after Wednesday.

“Usually it’s one or two games that you feel good, and then you have two really good weeks,” said Teixeira, who has eight home runs and 22 RBIs this year. “I’m not sure if I’ve played two weeks straight. It’s just been that kind of year, unfortunately.”

advertisement | advertise on newsday

Teixeira said that in addition to his latest ailment, his right knee has shown a tendency to start “barking a little bit” when he plays more than a few days consecutively. With that still in mind, plus a desire to limit the workload on Teixeira’s left foot, Joe Girardi said he would rest his $180 million first baseman every three or four days.

When the man with 402 career home runs is in the lineup, though, the Yankees (48-46) expect his bat to help them continue chasing first-place Baltimore (53-40). Before Wednesday’s games, FanGraphs.com projected the Yankees had a 9.1 percent chance of making the playoffs.

“You see where he’s hitting in our lineup,” said Girardi, who slotted Teixeira fifth on Wednesday. “It’s really important that he is productive and does the things that we know he’s capable of doing.”