Commutators and self-adjointness of Hamiltonian operators