The Schwarzschild-AdS solution is given by \begin{align} \label{eq: Schwarzschild-AdS metric} ds^2=-f(r)dt^2+\frac{dr^2}{f(r)}+r^2d\Omega^2\,, \end{align} where \begin{align} f(r)=1-\frac{2MG}{r}-\frac{\Lambda r^2}{3}\,. \end{align} This metric has an event horizon when $f\left(r_h\right)=0$, which is a cubic polynomial equation for $r_h$, \begin{align} r_h-2MG-\frac{\Lambda r_h^3}{3}=0\,. \end{align} After considering the Gibbons-Hawking-York contribution, the Euclidean on-shell action of General Relativity reads \begin{align} I_\text{E}\approx-i\beta\left(\frac{M}{2}+\frac{\Lambda r_h^3}{6G}\right)\,, \end{align} where $\approx$ stands for a relation that holds on-shell, and \begin{align} \beta=\frac{4\pi}{f'(r_h)}=\frac{4\pi}{2MG/r_h^2-2\Lambda r_h^2/3}\,, \end{align} is the (inverse of) Hawking's temperature. We identify $I_\text{E}$ as the logarithm of the partition function in the saddle-point approximation, \begin{align} \ln Z\equiv iI_\text{E}=\beta\left(\frac{M}{2}+\frac{\Lambda r_h^3}{6G}\right)\,. \end{align} I want to obtain the internal energy and the entropy, given by relations \begin{align} U=\frac{\partial \ln Z}{\partial\beta}\,,\quad S=\left(\beta\frac{\partial}{\partial\beta}-1\right)\ln Z\,, \end{align} respectively. Although I'm sure that the obtained logarithm of the partition function is the right one, I am unable to obtain the internal energy and the entropy (or to rewrite the logarithm of the partition function as the free energy $F=M-\frac{S}{\beta}$, with $S=A/(4G)$, where $A=4\pi r_h^2$).
Perhaps a trick that may be useful is to rewrite the integration constant associated to the mass $M$ in terms of $\Lambda$ and $r_h$, given by relation $f(r_h)=0$, \begin{align} M=-\frac{r_h\left(-3+\Lambda r_h^2\right)}{6G}\,, \end{align} however, I obtain nothing.