Banner Day was hardly a banner afternoon for the Mets, who were on the verge of getting swept by the worst team in the NL and going into a headlong spiral. After a gut-wrenching loss in the first game of a doubleheader against Arizona, spot-starter Daisuke Matsuzaka salvaged a split in the second.

The 4-2 victory over Arizona wasn’t easy or pretty. But after having dropped eight of their last 10 and fallen a season-high six games under .500 with the loss in the first game — and Ike Davis returning to town with Pittsburgh on Monday — they’ll take what they can get.

After losing Bartolo Colon to Friday’s rainout, the Mets turned to Matsuzaka in his first start since last Sept. 25. What he gave them was nothing short of outstanding: three hits and two runs in six innings.

“I haven’t thrown this many innings or pitches in a while, so I didn’t know exactly how my body would respond. But I was confident I’d be able to get through it,’’ Matsuzaka (2-0) said through a translator. “I was given the ball to start with the expectation to pitch deep into the game. I would’ve liked to pitch into the seventh, but I was able to pitch through the sixth and contribute for the team.’’

More like save the team. After a 15-11 start, the Mets were on the verge of going 6-17 since, falling behind 2-0 in the second inning on Martin Prado’s RBI triple and Cody Ross’s RBI groundout. But Matsuzaka — whose 98 pitches were 42 more than his season-high — shut the door.

He helped his own cause with an RBI single in the second, Bobby Abreu tied it with an RBI double in the fifth, Ruben Tejada gave the Mets the lead with a pinch-hit RBI single in the sixth and Daniel Murphy added an insurance RBI single in the eighth.

“It’s a tremendous lift for everybody,’’ Terry Collins said. “To have him come in and do the job he did when he hasn’t been lengthened out at all tells you the kind of heart he’s got. He knew we needed help … and gave us a tremendous outing.

“We realize we’re not hitting, not driving in runs. When you win a game … it’s a lift. It’s nice to go into the next series with a ‘W’. We can make something of the homestand if we play well against the Pirates, but we’ve got to start scoring some runs.”

Easier said than done, which is why the Mets (22-27) essentially are tied with Philadelphia in the NL East cellar.

With the bases loaded, they’re batting .136, hitless in their last nine at-bats. The Mets grounded into a team-record five doubleplays in the first game — four against Bronson Arroyo, whose fastball velocity matched the cars going by on the nearby Grand Central. It wasted a solid outing from Rafael Montero (six innings, two hits, one run) and doomed Jenrry Mejia (4-1) to his first loss.

Mejia had been on the mound in the first game, when Murphy, at second base, dropped David Wright’s throw to let A.J. Pollock score the go-ahead run with two outs in the ninth. But Mejia closed out the ninth in the second game for his third save of the season.

“I’m starting to feel very comfortable,” Mejia said. “Now I feel like I’m the closer. I’ve got to be there in the ninth inning every day. They let me know in the eighth I was coming out in the ninth — so I feel like the closer now. I’m a closer.’’