We introduce a general method to block diagonalize Hamiltonians with infinite-range interactions and arbitrary lattice sites f. As a working example we consider the case of the quantum discrete self-trapping Hamiltonian on a lattice which is a complete graph. We show the effectiveness of our method by computing the blocks into which the Hamiltonian decomposes for a finite number of quanta and for an arbitrary number of f of lattice sites.