We develop the Euclidean time method of the variational quantum eigensolver for solving the generalized eigenvalue equation \(A |\phi _n \rangle = \lambda _n B |\phi _n \rangle \) , where A and B are hermitian operators, and \(|\phi _n \rangle \) and \(\lambda _n\) are called the eigenvector and the corresponding eigenvalue of this equation, respectively. For the purpose, we modify the usual Euclidean time formalism, which was developed for solving the time-independent Schrödinger equation. We apply our formalism to three numerical examples for test. It is shown that our formalism works very well in all numerical examples. We also apply our formalism to the hydrogen atom and compute the electric polarizability. It turns out that our result is slightly less than that of the perturbation method.