Nils Lundkvist and Roope Hintz scored in regulation for Dallas, and Jason Robertson also scored in the shootout. The Central Division leaders dropped three straight 3-2 games in overtime before the All-Star break.
''When you look at the entirety of the game, we did some really good things,'' Stars coach Pete DeBoer said.
Dallas goaltender Jake Oettinger made 33 saves. He also denied Trevor Zegras and Adam Henrique in the shootout.
Oettinger, who went into play tied for second in the league with a 2.26 goals-against average, is 5-0-0 against Anaheim.
Henrique and Jakob Silfverberg scored in regulation for the Ducks, who had won a season-best three in a row. Mason McTavish scored in the shootout.
Anaheim's John Gibson stopped 39 shots through overtime.
''He's our star player,'' Silfverberg said, ''and he showed that tonight.''
The Stars went 0 for 5 with the man advantage, including coming up empty on a 5-on-3 opportunity in the closing minutes of the second period.
The Ducks are last in the Pacific Division with 38 points, on course for their fifth consecutive losing season.
''I think when you're in a rebuild like this, it's easy to get down and check out once you get behind,'' Ducks coach Dallas Eakins said, ''but our guys seem to keep battling not only for the team but for each other.''
Lundkvist scored on a backdoor pass through the low slot from Radek Faksa out of the left corner at 8:28 of the first period. Lundkvist was a healthy scratch in four of Dallas' five previous games.
Hintz tipped in a pass from the left boards by Denis Gurianov, making it 2-0 at 7:35 of the second period.
Silfverberg and Henrique scored in an 86-second span midway through the third, tying it at 2. It was Silfverberg's sixth goal of the season and No. 19 for Henrique.
MILESTONE FOR BENN
Dallas forward Jamie Benn skated in his 1,000th NHL game, all with the Stars. His accomplishment was recognized during the first TV break. His family watched from a suite.
''It's been a pretty fun last couple days with the `fam' and a good night overall,'' Benn said.
Benn's total is second in the history of the Minnesota-Dallas franchise behind Mike Modano's 1,459 games.
GONE BUT NOT FORGOTTEN
Anaheim defenseman John Klingberg returned to Dallas after spending his first eight seasons with the Stars. He acknowledged a video tribute by his first NHL team.
''This is where I started my career,'' Klingberg said after the morning skate, ''and it's always going to be a special place.''
Benn was penalized in overtime for high-sticking Klingberg.
''I thought he dove,'' Benn said.
Troy Terry, Anaheim's All-Star forward, left with an upper-body injury after only three shifts. ... The Stars are 20-0-1 when leading after two periods. ... Dallas has played four consecutive games beyond regulation for the first time since November 2013 (3-0-1).
Ducks: Finish a road back-to-back against the Chicago Blackhawks on Tuesday.
Stars: Play the Minnesota Wild on Wednesday, continuing an eight-game homestand.
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.