The Molecular Hydrogen Explorer, H2EX, was proposed in response to the ESA 2015 - 2025 Cosmic Vision Call as a medium class space mission with NASA and CSA participations. The mission, conceived to understand the formation of galaxies, stars and planets from molecular hydrogen, is designed to observe the first rotational lines of the H2 molecule (28.2, 17.0, 12.3 and 9.7 micron) over a wide field, and at high spectral resolution. H2EX can provide an inventory of warm (> 100 K) molecular gas in a broad variety of objects, including nearby young star clusters, galactic molecular clouds, active galactic nuclei, local and distant galaxies. The rich array of molecular, atomic and ionic lines, as well as solid state features available in the 8 to 29 micron spectral range brings additional science dimensions to H2EX. We present the optical and mechanical design of the H2EX payload based on an innovative Imaging Fourier Transform Spectrometer (IFTS) fed by a 1.2m telescope. The 20'x20' field of view is imaged on two 1024x1024 Si:As detectors. The maximum resolution of 0.032 cm^-1 (FWHM) means a velocity resolution of 10 km s^-1 for the 0-0 S(3) line at 9.7 micron. This instrument offers the large field of view necessary to survey extended emission in the Galaxy and local Universe galaxies as well as to perform unbiased extragalactic and circumstellar disks surveys. The high spectral resolution makes H2EX uniquely suited to study the dynamics of H2 in all these environments. The mission plan is made of seven wide-field spectro-imaging legacy programs, from the cosmic web to galactic young star clusters, within a nominal two years mission. The payload has been designed to re-use the Planck platform and passive cooling design.