Computing the effective Hamiltonian of low-energy vacuum gauge fields