The purpose in this paper is to determine the global behavior of solutions to the initial-boundary value problems for energy-subcritical and critical semilinear heat equations by initial data with lower energy than the mountain pass level in energy spaces associated with self-adjoint operators satisfying Gaussian upper bounds. Our self-adjoint operators include the Dirichlet Laplacian on an open set, Robin Laplacian on an exterior domain, and Schrodinger operators, etc.