Updated

SAN FRANCISCO -- Madison Bumgarner has rediscovered his winning ways.

Now he just needs to find his winning form.

With a showdown looming Monday with Los Angeles Dodgers ace Clayton Kershaw, Bumgarner gets a tune-up against a team he has dominated, the San Diego Padres, in the finale of a three-game series Wednesday.

The Giants (77-67) will enter the afternoon affair in desperation mode. They suffered consecutive losses to the Padres to open the three-game series, including a gut-wrencher when San Diego rallied for five runs in the ninth inning Tuesday for a 6-4 triumph.

The late turnaround prevented the Giants from gaining a game on the Dodgers (81-63) in the National League West. Instead, San Francisco lost a game to both the New York Mets (77-68) and St. Louis Cardinals (76-68) in the wild-card race.

Where San Francisco will stand when it arrives in Los Angeles on Monday will depend on Bumgarner's outing against the Padres, then a critical four-game home series against the Cardinals that begins on Thursday.

The Cardinals (76-68) could tie the Giants in the wild-card standings with a win Wednesday against the Chicago Cubs and a third straight San Francisco loss to the Padres.

"We just have to put this one behind us," Giants manager Bruce Bochy said of Tuesday's debacle. "That was tough. Like a punch in the stomach."

The Giants' chances of catching the Dodgers and/or holding off the Cardinals hinge on the left arm of Bumgarner, who on Aug. 7 saw his record fall to 10-7 with his fifth consecutive non-winning effort.

But the 2014 World Series Most Valuable Player has rebounded to win four of his last six starts, improving his record to 14-8 along the way.

While he has gone 3-1 in his last five outings, however, Bumgarner has been anything but dominant. He has allowed 18 runs and 31 hits in those 29 innings.

Fortunately for Bumgarner, a visit by the Padres gives him an opportunity to shape up before the meeting with Kershaw.

Bumgarner hasn't lost in San Diego's last four trips at AT&T Park in San Francisco, allowing just four runs in 30 1/3 innings (1.19 ERA) while going 3-0.

A win Wednesday not only would help the Giants but would give the left-hander a small piece of franchise history.

Bumgarner will be seeking his 100th career win as a Giant. If it happens, at age 27, he would become the third-youngest Giant ever to reach the milestone.

Bumgarner will be opposed by Padres right-hander Luis Perdomo, who has been unimpressive against the Giants in three meetings this season.

The right-hander started the Padres' 7-6 home win over the Giants on July 16, but he didn't stick around long enough to pick up the win. He was roughed up for three runs and eight hits over 4 2/3 innings.

Perdomo will be backed this time around by a high-flying group that celebrated Tuesday's win by showering offensive star Ryan Schimpf and winning pitcher Jake Smith with shaving cream in a jubilant locker room.

Smith recorded his first major-league win thanks to Schimpf's two-out, two-strike, three-run home run in the ninth inning.

"Schimpfy did all the work. All I did was throw up a zero," said Smith, who pitched a scoreless eighth inning to keep the Padres within 4-1. "This was everything I dreamed of."