ST. LOUIS -- For the first time in 10 years, the St. Louis Cardinals will go into the All-Star break with a losing record.

But according to infielder Matt Carpenter, that doesn't mean they can't go into four days off without momentum.

"We beat Arizona in a series, we beat Washington in a series, we split a series with Miami," he said after Friday night's 6-5 loss to the New York Mets. "If we can come back and win this series, we'll be on a roll going into the break."

To go on that roll Carpenter referenced, St. Louis (41-45) must beat New York twice, starting with Saturday's game.

Friday night's game could have easily been won. The Cardinals belted four homers off Mets ace Jacob deGrom, the first time he has yielded four homers in his career. But another subpar outing by All-Star pitcher Carlos Martinez and a damaging error by Carpenter led to defeat.

Martinez allowed five runs in five innings as he dropped to 0-3 in his last four starts. Carpenter whiffed on a Yoenis Cespedes grounder up the middle to start the seventh inning. It later turned into the eventual winning run on T.J. Rivera's double.

It was Carpenter's third miscue in five games at second base, where he moved this week so rookie Luke Voit could play first base.

"It stings right now," Carpenter said of the error. "But I have to get over it because we have a game (Saturday)."

In that game, St. Louis will turn to Adam Wainwright (9-5, 5.48 ERA) to even the series. Wainwright has won his last two starts, although Monday night's 14-6 victory over Miami screamed "mixed bag."

After dominating the Marlins for four innings and taking an 11-0 lead to the fifth, Wainwright almost didn't qualify for the win as he gave up six runs before finally getting the third out of the inning. But he fanned eight, including Giancarlo Stanton three times.

Wainwright has struggled to solve New York during his career, going 3-5 with a 5.03 ERA in 11 career games, nine of them starts. He was 0-1 with a no-decision last year in two starts.

The Mets (39-45) will send Zach Wheeler (3-5, 5.01) to the mound for his first career start against the Cardinals. Wheeler is making his second start since coming off the 10-day disabled list for biceps tendinitis.

In 3 2/3 innings July 1 against Philadelphia, Wheeler gave up two hits and two unearned runs in New York's come-from-behind 7-6 win.

Both pitchers could face an additional challenge if Busch Stadium again plays as small as it did for most of Friday night. The teams combined for six homers, one off the record for a game in the 12-year old ballpark that usually favors pitchers.

"Today, the ball was carrying like crazy," Mets manager Terry Collins said.

New York right fielder Jay Bruce took advantage of the conditions, going 3-for-5 with his 22nd homer of the year. It was his 11th career homer at Busch, where he played frequently with the Cincinnati Reds before being traded to the Mets in 2015.

"When it gets hot here, it plays well for hitters," he said of the stadium.