  We present a rigorous, regularization independent local quantum field
theoretic treatment of the Casimir effect for a quantum scalar field of mass
$\mu\ne0$ which yields closed form expressions for the energy density and
pressure. As an application we show that there exist special states of the
quantum field at fixed cosmic time, in which the expectation value of the
renormalized energy-momentum tensor is independent of the space coordinate and
is of the perfect fluid form $g_{\mu,\nu}\rho_{vac}$ with $\rho_{vac}>0$, thus
providing a quantum field theoretic foundation of the Cosmological constant.
Using some values of $\mu$ suggested in the literature for the hypothetical
axion particle, there results a model for dark energy which is consistent with
past and future evolution and is also in good agreement with experimental data.
