Say it ain’t so, Coco.

Coco Vandeweghe’s ride to a potential third-round showing against Serena Williams was derailed by Bethanie Mattek-Sands, and she took out her frustration on her racket during a wicked tirade after losing the first five games of the match.

Vandeweghe, who admitted she was looking ahead to a Williams match, ferociously slammed her racket four times while seated during the changeover, destroying the frame. For good measure, she put up her arms to the crowd, stood and wailed the racket a fifth time against the Louis Armstrong Stadium court.

It was as memorable a Flushing meltdown as there’s been in recent years. It didn’t get much better as Vandeweghe was swept away, 6-1, 6-2 Wednesday.

“I definitely wasn’t doing it for the fun of it,’’ said Vandeweghe, the niece of ex-Knick Kiki Vandeweghe. “I’m down 5-0. It was definitely a lot of nervous energy and pent-up frustration. I let it rip.’’

And the final whack was dedicated to the Flushing Meadows throng who appreciated the show of emotion.

“It was all for them, 100 percent,’’ Vandeweghe said. “I took frustration out on the racket. You can watch it — I’ve already seen clips videos of it and heard about it from players in the locker room. They played it on TV a couple of times.’’

Vandeweghe, ranked 45th, had upset Sloane Stephens in the first round, creating hope of a Serena showdown and the anticipation crept into Vandeweghe. The 6-foot-1 Vandeweghe held her serve just twice against the 101st-ranked Mattek-Sands.

“I probably wasn’t in the best mind-set I could’ve been,’’ said Vandeweghe. “I definitely was thinking ahead and looking into the future than I was looking into the present, which I’m probably the most disappointed in myself. I wasn’t in the here and now. I was looking into the future.’’

A Serena future?

“That’s definitely what I’m referring to,” she said. “It’s unfortunate I was thinking that way. That’s why I’m really disappointed about that. My goal going into the tournament was second week.’’