OAKLAND, Calif. — After the Yankees were swept out of the Bay Area by the resourceful Athletics and headed for Southern California to play the powerhouse Dodgers, Aaron Boone didn’t miss a gear in talking about the task that awaits his slumping club.

“That’s what these guys do, that’s what we do,’’ the manager said when asked how his club, which has lost four straight, can rebound. “Looking forward to going down to L.A. and obviously playing a great club down there in their ballpark where they are really good. So we know we have our work cut out for us, but we also embrace the challenge. Over the course of a long season, you are going to take one in the mouth.

“We got punched in the mouth here in Oakland, but we move on and enjoy the challenge of facing a great National League club.’’

Thursday night was a challenge on several fronts for the Yankees, who dropped a 5-3 decision to the A’s in front of an Oakland Coliseum crowd of 24,758.

It was the third time the Yankees (83-46) have been swept this season, and the four-game skid that started Sunday in The Bronx against the Indians matches their longest slide of the year.

The loss, which Masahiro Tanaka was saddled with and which the right-hander took the blame for despite Gleyber Torres making a bad throw to first on a double play ball that would have limited the A’s to one run instead of two in the third inning, cost the Yankees ground on several fronts.

Combined with the second-place Rays beating the Orioles, the loss trimmed the Yankees’ AL East lead to eight games. The Dodgers topped the Blue Jays and have a two-length lead over the Yankees in the race for the best record in the major leagues and home-field advantage in the World Series.

While Boone praised Tanaka for bouncing back from a first inning in which the first three A’s reached base and the hosts scored three runs, Tanaka put the onus on himself.

“That was more on me,’’ said Tanaka, who issued two walks and gave up three hits in the first when he required 32 pitches to complete.

Tanaka (9-7), who was 2-1 with a 1.26 ERA in his previous two starts against the Blue Jays and Indians, gave up five runs and eight hits in six innings.

The A’s opened the third inning with three straight hits and scored two runs thanks to Torres not being able to turn a double play that would have ended the inning.

“I think I got a little lazy. I didn’t prepare myself for that situation,’’ said Torres, who took Didi Gregorius’ throw at second to force Mark Canha for the second out. “Everybody makes mistakes. I am a human.’’

He was more than human at the plate, where the 22-year-old went 4-for-4, homered twice and scored three runs.

“The first couple of days I didn’t feel comfortable. Everything is different in the ballpark,’’ said Torres, who has 31 homers after hitting solo shots in the seventh and ninth innings. “Today I felt really good.’’

During their four-game slide, the Yankees have gone 6-for-28 (.214) with runners in scoring position and stranded 32 runners.

Now, the focus turns to Dodger Stadium, where the Dodgers’ 51 wins are the most home victories in baseball.

“We lost this series and we go to another big city for us,’’ was Torres’ take on losing three to the Athletics and heading for Los Angeles. “Tomorrow is another day.’’

And one when the Yankees hope they can avoid absorbing more punches in the mouth.