H₂CO Distribution and Formation in the TW HYA Disk