Anders Lee, Zach Parise and Cal Clutterbuck also scored for New York. Semyon Varlamov made 27 saves for his first victory of the season.
''We want to find consistency in our game,'' Islanders forward Matt Martin said. ''If you get off to a good start, when you do hit adversity throughout the year, there is a little bit of wiggle room there. You are not feeling the weight of the world on your back.''
Nico Sturm and Evgeny Svechnikov scored for San Jose. James Reimer made 40 saves in the second game of a four-game trip.
''It sucks,'' Sturm said about the disappointing start. ''I got to look back but I haven't been on a losing team I think since my first year of juniors. It's not really something I am used to. I don't like it.''
Wahlstrom gave New York a 3-2 with 56 seconds left in the second period. The 22-year-old forward wired a wrist shot under Reimer's glove.
Wahlstrom scored again at 5:24 of the third, hammering a shot past Reimer's blocker.
''I like to shoot from you know, everywhere, Wahlstrom said. ''I try to catch the goalie off guard.''
New York forward Josh Bailey played his 996th game as he moves closer to joining Bryan Trottier (1,123) and Potvin (1,060) as the only Islanders to reach that total. The 33-year-old Bailey is in his 15th season with the team, which ties Potvin and Trottier for most by an Islanders skater.
NOTES: The Islanders scratched forwards Kieffer Bellows, Ross Johnston and Nikita Soshnikov. ... San Jose scratched defenseman Scott Harrington and forwards Oskar Lindblom and Noah Gregor. . Sharks forward Alexander Barabanov made his season debut after missing first four games with a lower-body injury. . The teams meet again March 18 in San Jose, California
Sharks: At New York Rangers on Thursday night.
Islanders: Host New Jersey on Thursday night.
More AP NHL: https://apnews.com/hub/NHL and https://twitter.com/AP-Sports
Copyright 2023 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.