Free-discontinuity problems generated by singular perturbation: the N-dimensional case