If I remember correctly, we are not breaking the bonds that hold the two hydrogen atoms together only the bond that holds the oxygen and hydrogen together. so it sould be 2h + O, then the oxidation of the anode also produces an O molecule so its actually 2H + 2O.