Oshie, who also scored in the shootout, tied it 2-2 with 59 seconds remaining in the third period on a one-timer from the right circle with Braden Holtby pulled for the extra skater.
The Capitals (15-3-4), who were coming off a 5-2 loss to the Montreal Canadiens on Friday, are 12-1-2 in their past 15 games.
WATCH: [All Capitals vs. Bruins highlights]
"I think it means we're doing some things right," Oshie said. "Obviously, we played most or all the game being down a goal, but we just stuck the course tonight, which was good to see. Obviously, a tough loss last night, we weren't really going except for maybe a couple guys, so it's nice to see us respond tonight and play to the very end, that's what it took."
Jakub Vrana scored the winner in the fifth round of the shootout, and Holtby made 21 saves.
"We have a lot of great shootout players, and you know I've been watching them and obviously learning from them," Vrana said.