Nonlinear wave propagation in locally dissipative metamaterials via Hamiltonian perturbation approach