The best tonic for these hurting Mets after getting spanked over four days at Dodger Stadium was finding an opponent in even bigger disarray than themselves.

Hello, Giants and goodbye losing streak. Even Asdrubal Cabrera’s pregame declaration that he wants a trade couldn’t distract the Mets, who rolled to an 11-4 victory at AT&T Park to snap a four-game skid.

Cabrera, who returned from the disabled list and was shifted to second base — raising the anger that has him now seeking a trade — went 3-for-6 in the Mets’ 20-hit attack.

“I am a professional player, so I always come to the ballpark to do the best for the team,” Cabrera said, when asked if he took his anger onto the field.

The Mets (32-41) continued a string of mediocre-to-awful starts from pitchers, with Seth Lugo knocked out after 5²/₃ innings in which he allowed four earned runs on seven hits and three walks. At least Mets pitchers kept the ball in the park, after watching the Dodgers slug 15 homers in the four-game sweep.

“I am not worried about the attitude of our club,” manager Terry Collins said. “Today [with Cabrera] was an unfortunate situation, but we got through it.”

The Giants (27-49) probably just wanted to sleep, after arriving home close to 6 a.m. local time following an all-night transcontinental flight from Atlanta.

Lugo (2-1) couldn’t get the final out in the sixth inning, as the Giants rallied for three runs. But to that point the right-hander was rolling, with one run allowed over five innings. The start was Lugo’s third since returning from the disabled list after missing the first two months with a partially torn ulnar collateral ligament.

“It’s always easy when the offense puts up numbers like that,” Lugo said.

Lefty Ty Blach was pummeled by the Mets, who scored seven runs in the second inning to seize control. Yoenis Cespedes had the biggest offensive night, driving in three runs in a 3-for-5 performance.

Cespedes’ two-run homer highlighted the Mets’ huge second inning, in which they sent 10 batters to the plate and scored six runs. Lucas Duda, Lugo, Wilmer Flores and Michael Conforto all doubled in the inning, helping the Mets take a 7-1 lead.

Duda, Flores and Conforto joined Cabrera and Cespedes with three hits. Duda homered in the seventh inning.