Claude Giroux scored, and Joonas Korpisalo made 15 saves for the Senators (22-26-2), who had won four straight games.
"It's frustrating to have this effort tonight," Giroux said. "We've been playing some really good hockey lately. I know it happens sometimes in a season that you have a flat game like this, but with the position we're in right now, it's unacceptable."
Pavel Mintyukov gave Anaheim a 1-0 lead at 9:19 of the first period when he scored on a rebound. It was his first goal in 11 games since Dec. 18.
"Offensively, I think we were very opportunistic," Ducks coach Greg Cronin said. "We had some cycles where we kept it in their zone for a bit, but not enough for me. I thought they controlled the puck more than we did on those cycles. I thought our transition game was good and I felt the emphasis today was to defend, and I thought we defended hard."
Vatrano made it 2-0 at 17:25 of the second period with a one-timer from the right point on the power play.
"It just wasn't our best game, by any means," Ottawa defenseman Jakob Chychrun said. "We started slow, and they were just outworking us all over the ice. It's a tough one to swallow. It just seemed like we were disconnected all over the ice and they played well. So, they definitely deserve that one and we did not."
McTavish extended the lead to 3-0 at 18:59 of the second, and pushed it to 4-0 at 2:18 of the third.
"It's great to get the win here in front of a lot of friends and family," said McTavish, who grew up in Carp, Ontario, about 15 minutes northwest of the arena. "It's great for them to be here and support me."