  In the present paper we show that the Hamiltonian describing the resonant
interaction of $N$ two-level systems with a single-mode electromagnetic quantum
field in the Coulomb gauge can be diagonalized with a high degree of accuracy
using a simple basis set of states. This allows one to find an analytical
approximation for the eigenvectors and eigenvalues of the system, which
interpolates the numerical solution in a broad range of the coupling constant
values. In addition, the introduced basis states provide a regular way of
calculating the corrections and estimating the convergence to the exact
numerical solution. The obtained results are valid for both quantum Rabi model
($N = 1$) and the Dicke model for $N \geq 2$ atoms.
