SAN JOSE, Calif. — With San Jose in a grueling stretch of eight games in 13 days before the All-Star break, coach Peter DeBoer knows he needs to get help from some unusual places if the Sharks want to avoid a letdown.

He got just that to cap a perfect 4-0 week.

David Schlemko scored his second goal of the season with 3:42 remaining in overtime and the Sharks got a goal from the fourth line for the third straight game to beat the Colorado Avalanche 3-2 on Saturday night.

"You need your depth guys on nights like this," DeBoer said. "We've ridden our big guys pretty hard. They played some tough minutes and some of the opponents we played this week. Tonight's a night you're looking for your depth guys to step up and give you some energy, and I thought we got that."

Joel Ward scored his second goal of the week and Melker Karlsson contributed the latest goal from the fourth line to help the Sharks win for the 15th time in their past 16 regular-season home games against Colorado. Martin Jones made 31 saves.

After blowing a 2-1 lead against the NHL's worst team, the Sharks still ended up with the two points when Logan Couture's shot was stopped by Spencer Martin and Schlemko knocked in the rebound to give Colorado its first loss in six games decided in 3-on-3 overtime.

"It's a game right now that you've got to really stick to your foundation, because there's a lot of games in a lot of nights here," captain Joe Pavelski said. "Again, we won as a team tonight. You had guys contributing. Joner made some big saves. We got the plays and the moments when we needed them."

Mikhail Grigorenko and Francois Beauchemin scored for the Avalanche, who have lost five straight and 10 of 11 games. Martin made 27 saves in his NHL debut but had no chance on the game-winner.

"I liked the way the team played," coach Jared Bednar said. "We're starting to get some traction on the way we want to play. We don't always get the results. A couple of mistakes ended up in our net."

The Avalanche put good pressure on early in the third in search of the tying goal, but Jones stopped Matt Nieto from in close and Nikita Zadorov hit the post to keep San Jose up 2-1.

But Colorado finally got the equalizer when Marc-Edouard Vlasic cleared a centring attempt and the puck went right to Beauchemin, who beat Jones with a shot from the circle to make it 2-2.

The teams traded goals in the second period. Colorado tied it when Nathan MacKinnon blew past Brent Burns in the neutral zone to set up Grigorenko for his fifth goal of the season, and the Sharks went back ahead when Karlsson deflected Ryan Carpenter's shot past Martin.

The Avalanche controlled the play early and nearly took the lead when Zadorov's point shot trickled past Jones. But Burns cleared it right off the goal line to keep the game scoreless.

The Sharks then capitalized on the power play when Joe Thornton skated out from behind the net and slid a pass through the crease to Ward, who tapped it in for his fifth goal of the season.

"The first few minutes were tough but after that I settled in," Martin said.

NOTES: Thornton recorded his 18th 30-point season. The only active players with more are Florida's Jaromir Jagr (22) and Colorado's Jarome Iginla (19). ... Nieto got a loud ovation after a video tribute in his first game back in San Jose since being claimed off waivers by the Avalanche earlier this month. ... Colorado F Rene Bourque was scratched after leaving Thursday's game with a lower-body injury and D Tyson Barrie missed his second straight with a lower-body injury.

UP NEXT

Avalanche: Host San Jose in back end of home-and-home on Monday.

Sharks: Visit Colorado in back end of home-and-home on Monday.