I thought it was really good, up until the "twist" with the wife. At that point, the whole thing goes off the rails, is completely out of left field, and isn't properly explained... it's all just sort of mumbled out.
in fact, they could have left the entire thing with the wife out, and the plot would kind of have been the same. It almost feels like.... the writer wrote out their movie, their story arc for Hancock... got to the part where he wins the adoration of the city... wrote the last scene with the heart logo on the moon... then realized he was 45 minutes short and inserted the whole strange backstory with the wife.
Interesting movie, pretty good, and gets credit for trying "something", but falls short of greatness.