instance, $\rho = {e^{-\beta H}}/{{\text{Tr}}({\exp^{-\beta H}})}$ leads to the thermodynamic relation $S = \beta\langle H \rangle$, and the expectation value is in general divergent in quantum field theory.

If we adopt ${\hat O} =\rho$, then $\zeta_{\rho}(s) =
\sum_n\frac{1}{\lambda_n^s} = \sum_n \exp(-s\ln\lambda_n)$. We note that $$\begin{aligned}
{\frac{d\zeta_{\rho}}{ds}}\bigg\vert_{s=-1} &=& -\lim_{s=-1} \sum_n
\exp(-s\ln\lambda_n)\ln\lambda_n\\
&=&-\sum_n \lambda_n \ln\lambda_n.\end{aligned}$$ Thus it is possible to define $S(s) \equiv {\frac{d\zeta_{\rho}}{ds}}(s)$, and analytically continue from values for which it is defined to $s=-1$. However, depending on the form of the operator $\rho$, it may still be that $s=-1$ is a pole of $\zeta_\rho(s)$.

An alternative then is to note the sum for $S$ in Eq.(\[e:415\]) does not include zero eigenvalues. Therefore we may substitute $\rho$ with its sub-matrix $\rho'$ which contains no zero eigenvalues. Its inverse, ${\rho'}^{-1}$, exists; and we may construct its generalized zeta function as $$\zeta_{[\rho']^{-1}}(s) = \sum_{n} (\lambda_n)^s.$$ Since $\rho$ is a density matrix, its eigenvalues satisfy $0 \leq \lambda_n
\leq 1 \,\,\forall n$; so for positive $s$, the sum is bounded above by the dimension of $\rho$, and therefore converges for any finite-dimensional $\rho$. Furthermore $$\begin{aligned}
S(s)\bigg\vert_{s=1} \equiv
-{\frac{d\zeta_{{\rho'}^{-1}}(s)}{ds}}\bigg\vert_{s=1} &=& -\lim_{s=1} \sum_n
\exp(s\ln\lambda_n)\ln\lambda_n\\
&=&-\sum_n \lambda_n \ln\lambda_n,\end{aligned}$$ and for infinite-dimensional $\rho$ we may also define the 