We present a consistent theoretical approach for calculating effective nonlinear susceptibilities of metamaterials taking into account both frequency and spatial dispersion. Employing the discrete dipole model, we demonstrate that effects of spatial dispersion become especially pronounced in the vicinity of effective permittivity resonance where nonlinear susceptibilities reach their maxima. In that case spatial dispersion may enable simultaneous generation of two harmonic signals with the same frequency and polarization but different wave vectors. We also prove that the derived expressions for nonlinear susceptibilities transform into the known form when spatial dispersion effects are negligible. In addition to revealing new physical phenomena, our results provide useful theoretical tools for analyzing resonant nonlinear metamaterials.