Domain of the spectral resolution of a self-adjoint operator

I'm following the proof on Yosida's Functional Analysis of the spectral theorem for (unbounded) self-adjoint operators, and on the first implication (that, given a spectral resolution $(E_\lambda)_{\lambda \in \mathbb{R}}$ on a Hilbert space $\mathcal{H}$, the operator $A = \int_{-\infty}^{\infty} f(\lambda) dE_\lambda$ defined on

$$\mathcal{D} = \{ \psi \in \mathcal{H} \ |\ \int_{-\infty}^{\infty} |f(\lambda)|^2 d\langle \psi, E_\lambda \psi \rangle < \infty \} \$$

is self-adjoint) he argues that the operator $A$ defined above is densely defined on $\mathcal{D}$ because this subspace contains every $\varphi \in \mathcal{H}$ such that $\varphi = E((-N, N])\varphi$ for some $0 < N < \infty$, where $E((-N, N]) = E_N - E_{-N^-}$, but I fail to see first why this is true and second, why that would imply that $A$ is densely defined because of it.

Because the approach seems to be a classical approach using he Riemann-Stieltjes integral, then it would follow that the author is assuming $f$ is bounded on finite intervals. And, if $M$ is a bound for $f$ on $[-N,N]$, $$\int_{-\infty}^{\infty} |f(\lambda)|^2 d\|E_{\lambda}E(-N,N]x\|^2 \\ \le M^2\int_{-N+0}^{N}d\|E_{\lambda}x\|^2 \le M^2\|x\|^2$$ The set $\{E(-N,N]x : N > 0, \; x\in\mathcal{H} \}$ is a dense subspace of $\mathcal{H}$ because $\lim_{N\rightarrow\infty}E(-N,N]x=x$.
• I forgot to mention that $f$ is a continuous function. Well, its clear why now. I'm just not sure about the integration limits on the second inequality, because I think $E(-N, N] = E_N - E_{-N^-}$, as resolutions of identity are defined as strong left-continuous... – B. Chinaski Aug 19 '18 at 4:35