Methanol and glycolaldehyde production from formaldehyde in massive star-forming regions