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) [C II]158 μm and [O I]63 μm lines and mid-infrared H_2 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 ([C II]158 μm+[O I]63 μm)/PAH in the ring about 50% lower than in Enuc N and S. The average 11.3/7.7 μm PAH ratio is also lower in the ring, which may suggest a larger fraction of ionized PAHs, but no clear correlation with [C II]158 μm/PAH(5.5-14 μm) is found. PAHs in the ring are responsible for a factor of two more [C II]158 μm and [O I]63 μm emission per unit mass than PAHs in the Enuc S. spectral energy distribution (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 G_0 ~ 10^(2.3) and n_H ~ 10^(3.5) cm^(–3) in the ring. For these values of G_0 and n_H, PDR models cannot reproduce the observed H2 emission. Much of the H2 emission in the starburst ring could come from warm regions in the diffuse interstellar medium that are heated by turbulent dissipation or shocks