Spectral analysis of the discrete Helmholtz operator preconditioned with a shifted Laplacian