Logan Couture broke a 2-2 tie early in the third period as San Jose snapped a five-game skid with a 3-2 victory against the Edmonton Oilers at Rexall Place on Monday night.
Joe Thornton had a goal and an assist while Torrey Mitchell also scored for the Sharks (34-25-9), who lost 11 of their previous 13 games and are fighting for their playoff lives in the ultra-competitive Western Conference.
San Jose is now just one point back of eighth-place Colorado. The Avs moved into playoff position with a 3-2 overtime win against Anaheim on Monday.
"We needed this really bad," Thornton said. "We're struggling right now and to come in here and get a big win, every game is so important for us. The playoffs have already started for us. It was just a huge two points for us.
"Hopefully this gives some guys some confidence."
Ryan Whitney and Taylor Hall replied for the Oilers (26-36-7), who have lost six of their last seven to remain second-last in the NHL.
"It doesn't take many (players) with the wrong attitude to make its way through your dressing room. It doesn't take many guys at all," Oilers coach Tom Renney said. "We have a few people who need to look in the mirror here, because this is unacceptable. You're the Edmonton Oilers. You're a millionaire. You have an opportunity to play the game. Suck it up and play hockey."
San Jose opened the scoring just 1:07 into the contest when Oilers goalie Devan Dubnyk lost sight of a bouncing puck before Mitchell put in the rebound off a shot by Tommy Wingels.
The Oilers tied the game with just 49 seconds to play in the opening period. Whitney wound up from the top of the faceoff circle and fired a shot past Sharks goalie Antti Niemi while the teams were skating in a 4-on-4 situation.
Dubnyk made up for his earlier gaffe midway through the second, coming across to make a huge stick save on a rebound attempt by T.J. Galiardi.
The Sharks went up 2-1 on the power play a minute later as Patrick Marleau fed a pass through to Thornton and he snapped home his 15th of the season.
Edmonton drew even again with five minutes to play in the second on a tremendous effort by Hall. After blocking a shot at his own blue-line, Hall turned on the jets to outrace a pair of San Jose defenders to the puck and beat Niemi for his 26th of the season.
The Sharks got their go-ahead goal 38 seconds into the third period as Dan Boyle unleashed a hard shot from the point that Couture tipped past Dubnyk while on the power play.
"Our power play was the difference tonight, getting those two goals," Couture said. "We created some opportunities from the top of the point and were able to get rebounds and tips off of them.
"We've been sliding and points are very important for us at the moment given our circumstances. We'll see how we build off this win. It's been a tough stretch for us. Any confidence we can get from winning games is huge for us right now."
The Sharks conclude a four-game road trip in Calgary on Tuesday night. Edmonton next plays host to Columbus on Wednesday, when Renney will be seeking a stronger effort.
"Problem No. 1 one was playing not to lose," Renney said. "Problem No. 2 is two power-play goals for your opponent. Problem three was deciding it was just too hard."
Material from wire services and team media was used in this report.