Negative energy densities in quantum field theory with a background potential