  We study pseudogap behavior in a metal near a spin density wave (SDW)
instability due to thermal magnetic fluctuations. We consider the $t-t'$
Hubbard model on a square lattice at a finite doping, at intermediate coupling
strength, and analyze the thermal evolution of the electron spectral function
between a SDW ordered state at low temperatures and a normal Fermi liquid at
high temperatures. We argue that for proper description of the pseudogap one
needs to sum up infinite series of diagrams for both the fermionic self-energy
and the SDW order parameter in the SDW state or the magnetic correlation length
in the paramagnetic state. We use the eikonal approach to sum up an infinite
series of diagrammatic contributions from thermal fluctuations. Earlier studies
found that in the SDW state, the spectral function $A_{\bf k}(\omega)$ of a hot
fermion at a finite $T$ is exponentially small below the energy scale $\Delta
(T)$, which scales with SDW order and vanishes at the ordering temperature
$T_N$, and has a hump at a larger frequency $\Delta_{\rm pg}$, comparable to
the zero-temperature SDW gap $\Delta (T=0)$. We argue that the hump, which we
associate with the pseudogap, survives in some $T$ range above $T_N$. We show
that this range is split by regions of strong and weak pseudogap behavior. In
the first region, $\Delta_{\rm pg}$ is weakly temperature dependent, despite
that it comes from thermal fluctuations. Such a behavior has been seen in
numerical studies of the Hubbard model. We show that to obtain it, one needs to
go beyond the one-loop approximation and sum up the infinite series of
diagrams. In the second regime, $\Delta_{\rm pg}$ decreases with increasing $T$
and eventually vanishes. We further argue that a magnetic pseudogap at a finite
$T$ emerges only if the ground state is magnetically ordered. We present the
phase diagram and apply the results to high-$T_c$ cuprates.
