NGC 1097 is a nearby Seyfert 1 galaxy with a bright circumnuclear starburst ring, a strong large-scale bar and an active nucleus. We present a detailed study of the spatial variation of the far infrared (FIR) [CII]158um and [OI]63um lines and mid-infrared H2 emission lines as tracers of gas cooling, and of the polycyclic aromatic hydrocarbon (PAH) bands as tracers of the photoelectric heating, using Herschel-PACS, and Spitzer-IRS infrared spectral maps. We focus on the nucleus and the ring, and two star forming regions (Enuc N and Enuc S). We estimated a photoelectric gas heating efficiency ([CII]158um+[OI]63um)/PAH in the ring about 50% lower than in Enuc N and S. The average 11.3/7.7um PAH ratio is also lower in the ring, which may suggest a larger fraction of ionized PAHs, but no clear correlation with [CII]158{mu}m/PAH(5.5 - 14um) is found. PAHs in the ring are responsible for a factor of two more [CII]158um and [OI]63um emission per unit mass than PAHs in the Enuc S. SED modeling indicates that at most 25% of the FIR power in the ring and Enuc S can come from high intensity photodissociation regions (PDRs), in which case G0 ~ 10^2.3 and nH ~ 10^3.5 cm^-3 in the ring. For these values of G0 and nH PDR models cannot reproduce the observed H2 emission. Much of the the H2 emission in the starburst ring could come from warm regions in the diffuse ISM that are heated by turbulent dissipation or shocks.