After a day in which their pitcher did not have a good start and their batters were poor finishers, the Yankees determined that this is just about a perfect time for a break. Not to say that they or their chances are broken, just that they can use a deep breath and a four-day respite to put the past 25 games behind them.

A month ago, the rest of the AL East was behind them, but things have changed. The Yankees skidded into the All-Star break with a 5-3 loss to the Brewers on Sunday at Yankee Stadium. Masahiro Tanaka was unable to continue his recent solid trend and the team proved too consistent for its own taste, finishing a 7-18 slide by again failing to win a second game in a row.

They are 0-8 after victories since June 13, a drought that was mimicked at the plate in big situations Sunday. They went 1-for-16 with runners in scoring position, stranding them there in the fifth, sixth, seventh, eighth and ninth innings, and left 10 on base.

“This is just a rough patch right now that we’re hitting,” said Aaron Judge, who struck out three times, including the first of three to whiff against closer Corey Knebel in the ninth. “That’s kind of our Achilles’ heel right now. We’re getting guys on, we just haven’t been able to drive them in. We’ve had a glimpse of how good this team can be. We’ve just got to regroup, take a couple days off and get ready for Boston.”

Judge, of course, will be the centerpiece of the Midsummer Classic in Miami, taking his major league-leading 30 homers into Monday night’s Home Run Derby. Still, the idea is for all of the Yankees (45-41) to get their minds off the spiral that has gotten hold of them.

Joe Girardi said of a team that is 3 1⁄2 games behind the Red Sox: “You’d like to finish strong going into the break, but we did not. So it’s probably not a bad time. It allows four more days for our guys to get healthy.”

The manager is mindful that by the time the Yankees reconvene at Fenway Park on Friday, they are likely to have Starlin Castro and Matt Holliday back from injury and illness, respectively, as they attempt to reverse their fortunes.

For a moment Sunday, it appeared they actually had taken the lead. Chase Headley and his teammates celebrated an apparent three-run homer against former Met Carlos Torres in the sixth, but a replay review showed that the ball had sailed just to the right of the rightfield foul pole. Headley then struck out and the Yankees did not score in that inning.

Nor did they push a run home in the seventh, when with runners on first and second, rightfielder Domingo Santana caught up with Gary Sanchez’s twisting liner at the last instant.

“I thought it had a chance, but at the same time, I noticed the outfielder made a really good adjustment,” Sanchez said through an interpreter. “He stayed with it.”

The Yankees had the tying run at the plate throughout the ninth after Brett Gardner led off with a walk, but Knebel — who allowed a walk-off three-run homer by Clint Frazier on Saturday — struck out Judge, Didi Gregorius and Sanchez, who looked at a third strike.

Tanaka (7-8) had left the Yankees little margin for error. He allowed a three-run homer by Travis Shaw, a long blast into the bleachers above the Yankees’ bullpen, before notching his second out of the game. Stephen Vogt led off the second with another home run.

Yankees videos

“The off-speed stuff wasn’t crisp, the fastball command wasn’t good and I got hurt with those two home runs,” Tanaka said through an interpreter. It certainly was nothing like the stellar three previous starts (a scoreless no-decision and two victories) for the No. 1 starter.

“I wouldn’t blame anybody if they think that it’s a step back,’’ Tanaka said. “But I understand what I did wrong and I will make the necessary adjustments going into my next outing. So I feel like I’ll be OK.”

The only thing to do now is spend four days forgetting about the past month. “Just try to really refresh,” he said, “and get some rest and come back strong.”

7-18 in last 25 games since moving to 38-23

24-32 in last 56 games since moving to 21-9 with a 20-5 stretch

1-for-16 with runners in scoring position Sunday

21 first-inning home runs allowed

23 home runs allowed by Masahiro Tanaka in 102 innings, one more than he allowed last year in 199 2⁄3 innings

Subscribe to Newsday’s sports newsletter

Receive stories, photos and videos about your favorite New York teams plus national sports news and events.