Getting error in fit
Well, without knowing the specifics of your algorithm, I assume that you basically have multiple functions (e.g. Gaussian or Lorentzian peaks, each with position and FWHM parameters, additionally maybe some polynomials for backgrounds etc.) and you sum them all up into one big "fit function" that you hand over to an optimization algorithm that jiggles the parameters around until you found a good fit in the sense of non-linear least squares.

What you can do then is computing the asymptotic standard errors. For this, you have to (most likely numerically) compute the Jacobi Matrix of your fit function (matrix of partial derivatives for each parameter (columns) at each measurement point (rows)). From this you can compute the variance-covariance matrix and then compute the errors for each parameter. This is an approach very often found in curve fitting software. In fact, there is a quite comprehensive explanation here at OriginLabs (see the section on Parameter Standard Errors). Also a more detailed overview can be found here at arxiv.

Other methods are discussed in this paper. They certainly are appropriate and maybe even mandatory in some cases, but I find them a bit too complicated for most "real world" applications.

If I were you, I would go with the asymptotic standard errors for a first start and see, if they fit the needs. It is an easy to implement strategy that is, as already said, also widely found in software packages.