Fundamentals of regularization in celestial mechanics and linear perturbation theories