The time-ordered and retarded-Green-functions are defined as
\begin{align} G_{ \alpha \alpha^{\prime}} (t) &= - \mathrm{i} \langle T_{t} \, a_{ \alpha } ( t ) a_{ \alpha^{\prime}}^{ \dagger } ( 0 ) \rangle \\ G_{ \alpha \alpha^{\prime}}^{ \text{ret}} (t) &= - \mathrm{i} \theta ( t ) \langle \{ a_{ \alpha } ( t ) , \, a_{ \alpha^{\prime}}^{ \dagger } ( 0 ) \} \rangle \end{align}
with grand-canonical-time-evolution-operators
$$ U(t) = \mathrm{e}^{- \mathrm{i} (H - \mu N) t / \hbar } $$
The e.o.m.-technique yields
\begin{align} G_{ \alpha \alpha^{\prime}} (\omega) &= \big[ \omega - \frac{ \operatorname{mat} H - \mu \mathbb{1}}{\hbar} \big]_{ \alpha \alpha^{\prime}}^{\operatorname{inv}} \\ G_{ \alpha \alpha^{\prime}}^{ \text{ret}} (\omega + \mathrm{i} \delta ) &= \big[ \omega + \mathrm{i} \delta - \frac{ \operatorname{mat} H - \mu \mathbb{1}}{\hbar} \big]_{ \alpha \alpha^{\prime}}^{\operatorname{inv}} \end{align}
However... In the book from Alexander Altland, in chapter 7, I find the identities
\begin{align} \operatorname{Re} G ( \omega ) &= \operatorname{Re} G^{ \text{ret}} (\omega) \\ \operatorname{Im} G( \omega ) &= \operatorname{Im} G^{ \text{ret}} (\omega) \cdot \tanh \frac{\hbar \beta \omega}{2} \end{align}
following from the Lehmann-representation.
This seems to me a little bit illogical due to the appearance of the tangens hyperbolicus in the lower equation. Why do these two sets of equations agree with each other?