The 32-year-old was left out of Jurgen Klinsmann's 23-man squad for the tournament in Brazil and he wasted no time in proving that that could be the wrong decision as he netted twice in his side's victory, breaking the MLS all-time scoring record in the process.
The Galaxy nearly doubled their lead when Gyasi Zardes beat his man down the right and fired a shot across goal, but MacMath made a great save to turn the ball away.
Robbie Keane came inches away from getting the second for the home side when he collected the ball on the edge of the area and chipped an effort at goal, only to see it crash off the crossbar.
After the break, Donovan got his record-breaking goal as Keane raided down the right and found him unmarked at the back post. Donovan made no mistake in slotting the ball home for his 145th goal in the MLS, becoming the all-time leading marksman in the history of the competition.
The Galaxy got their third as Keane capitalised on an error from Sheanon Williams to race into the box and slide the ball through the legs of MacMath with a simple finish.
Donovan notched his brace in the 81st minute as he combined with Keane again and he took his time from 12 yards to place the ball beyond the reach of MacMath into the bottom corner.