Perry (first round), Cam Fowler (fourth) and Brandon Montour (sixth) scored for the Ducks in the shootout. Donskoi (third), Brent Burns (fourth) and Tim Heed (sixth) scored for the Sharks.
San Jose outshot Anaheim 3-0 in overtime but couldn't get the puck past Berra, who stopped a deflected Burns shot with his mask at 2:58.
Berra started one night after No. 1 goaltender John Gibson made 50 saves in a 3-2 win against the Florida Panthers. Regular backup Ryan Miller is out with a lower-body injury.
"That's the depth of your organization," Ducks coach Randy Carlyle said. "Goaltending, people would say it's the most critical one. You don't know how important it is until you don't have it. Reto tonight stood tall for us, earned us the extra point.
"Again, good person, he's worked hard. It's good to see. He's a good teammate. It's good to see those kind of things happen for him. We sure are thankful he's part of our organization."
Perry tied it 1-1 45 seconds into the second period. Montour sent a cross-ice pass from the right side to Perry, who put a wrist shot inside the left post before Jones could recover.
The Ducks took a 2-1 lead when Rakell scored on a rebound at 11:39 of the second. Jones stopped Perry's shot from the high slot but couldn't cover the puck. Rakell got to it and shot between Jones' pads.
Donskoi scored his second goal of the night on the power play at 8:19 of the third period to tie it 2-2. Danny O'Regan's shot deflected off Sharks forward Tomas Hertl, and Donskoi got to the loose puck and beat Berra with a backhand.
"We've got a lot of good players in this room," Donskoi said. "After last year, I was really looking to bounce back. We have a lot of young guys who have a chance to play a bigger role."
Donskoi gave San Jose a 1-0 lead at 3:31 of the first period. He knocked the puck away from center Dennis Rasmussen deep in Anaheim's end, got it back from Logan Couture and put it between Berra's pads from in front.
"It was a tough start and a good chance that they scored on, but after that I get better and better into the game," Berra said. "I stayed calm, I stayed big."