We obtain an existence theorem of nonzero solution for a class of bounded selfadjoint operator equations. The main result contains as a special case the existence result of a nontrivial homoclinic orbit of a class of Hamiltonian systems by Coti Zelati, Ekeland and Séré. We also investigate the existence of nontrivial homoclinic orbit of indefinite second order systems as another application of the theorem