We examine the thermal energy contents of the intergalactic medium (IGM) over three orders of magnitude in both mass density and gas temperature using thermal Sunyaev-Zeldovich effect (tSZE). The analysis is based on {it Planck} tSZE map and the cosmic density field, reconstructed for the SDSS DR7 volume and sampled on a grid of cubic cells of $(1h^{-1}{rm Mpc})^3$, together with a matched filter technique employed to maximize the signal-to-noise. Our results show that the pressure - density relation of the IGM is roughly a power law given by an adiabatic equation of state, with an indication of steepening at densities higher than about $10$ times the mean density of the universe. The implied average gas temperature is $sim 10^4,{rm K}$ in regions of mean density, $rho_{rm m} sim {overlinerho}_{rm m}$, increasing to about $10^5,{rm K}$ for $rho_{rm m} sim 10,{overlinerho}_{rm m}$, and to $>10^{6},{rm K}$ for $rho_{rm m} sim 100,{overlinerho}_{rm m}$. At a given density, the thermal energy content of the IGM is also found to be higher in regions of stronger tidal fields, likely due to shock heating by the formation of large scale structure and/or feedback from galaxies and AGNs. A comparison of the results with hydrodynamic simulations suggests that the current data can already provide interesting constraints on galaxy formation.