Schwinger-Keldysh formalism. Part II: thermal equivariant cohomology