A nonlinear regularization method for the calculation of relaxation spectra