Many-body theory of correlation effects in externally perturbed systems