Infinite dimensional oscillatory integrals with polynomial phase function and the trace formula for the heat semigroup