D.C. United hasn’t had much reason to celebrate of late, as it now sits on the verge of elimination from the MLS playoffs. (Ned Dishman/GETTY IMAGES)

For weeks, despite failing to make up ground in the MLS playoff race, D.C. United drew comfort from having played fewer matches than its primary competitors. But those opportunities have melted away without yielding many points, and with the regular season in the final days, D.C. no longer controls its postseason fortunes.

United (9-12-11, 38 points) needs to defeat the Portland Timbers on Wednesday night at RFK Stadium and hope the New York Red Bulls (9-8-16, 43) lose Thursday’s finale against visiting Philadelphia.

From there, United would have to beat first-place Sporting Kansas City on Saturday to clinch the final wild-card berth.

“We’re not where we want to be,” captain Josh Wolff said, “but we’re still in it.”

With United at home for both games and Red Bulls star Thierry Henry out on a red card suspension, the three-result scenario is plausible. But United has lost four in a row, failed to win consecutive leagues matches in two-plus years and, last weekend, endured a calamitous finish against Chicago.

“Is it mentally going to be tough? Of course,” midfielder Santino Quaranta said. “Over the years, teams have squeaked into the playoffs. Crazy things have happened. We’ll continue to work hard until it’s finished.”

United could sneak in with two victories and a New York draw but only under extraordinary circumstances: making up a wide margin in overall goal difference, the second tiebreaker after head-to-head results (one win apiece). The Red Bulls have scored five more goals than they’ve conceded; United has allowed two more than it has scored.

In other words, United needs New York to lose. Perhaps most disheartening to United is that it shouldn’t have come to this. One victory or even a draw in the previous four outings would’ve enhanced its outlook considerably.

“We’ve found ways to lose,” said team president Kevin Payne, whose organization is in danger of missing the postseason for a club-record fourth straight year and seventh time in 12 seasons. “We did more good than bad [against Chicago], but we just lost our composure.”

United’s remaining opponents won’t ease up. The expansion Timbers (11-14-7, 40 points) remain in the playoff hunt with two matches left and Kansas City (12-9-12, 48) is vying with Philadelphia (11-7-15, 48) for the top seed in the Eastern Conference.

On Saturday in a 2-1 loss to Chicago, United Coach Ben Olsen employed blue-collar tactics that, despite lacking inspiration, positioned the club for victory until it conceded two goals in added time. On Wednesday, with desperation gripping both clubs, a more ambitious approach is anticipated.

“I don’t think it’s going to be a real defensive game,” Olsen said. “People have to score goals. It should be an exciting game, it should be a game that is high energy and high stakes.”

Olsen’s comments suggest a bolder lineup, perhaps with Dwayne De Rosario dropping from the front line into a playmaking role and Charlie Davies or another forward starting up front with Wolff.

Although his 11 goals are second to De Rosario’s 15 on the team list, Davies hasn’t scored or made much impact since recording a hat trick at Chivas USA on Sept. 10. Since that game, he has started three times, entered as a sub twice and sat out twice.

Davies (24 minutes in the past two matches) vented about playing time after Saturday’s match, a complaint that Olsen took in stride.

“He didn’t seem that frustrated. I was never happy when I wasn’t playing either,” the former midfielder said.

Asked if he thought Davies was struggling in certain areas, Olsen said tersely: “He’s fine. He’s 100 percent.”

Not so with defender Dejan Jakovic, who has been sidelined with a hamstring ailment longer than expected. United is 6-4-5 with him in the lineup, 3-8-6 without him.

After Monday’s practice, assistant coach Chad Ashton said Jakovic’s chances of playing were “50-50.” On Tuesday, Olsen said: “He’s getting there.”

United note: The Portland match was initially scheduled for Aug. 27 but was postponed because of Hurricane Irene. Original tickets are valid.