A formula related to the Moore-Penrose pseudo-inverse of Hilbert space operators Let $E$ an infinite dimensional complex Hilbert space and $\mathcal{L}(E)$  be the algebra of all bounded linear operators on $E$.
Definition: Let $T \in \mathcal{L}(E)$. The Moore-Penrose inverse of $T$, denoted by $T^{+}$, is defined as the unique linear extension of $(\bar{T})^{-1}$ in
 $$D(T^{+}) = \mathcal{R}(T)+\mathcal{R}(T)^{\perp},$$
with $\mathcal{N}(T^{+}) = \mathcal{R}(T)^{\perp}$ and  $\bar{T}$ is the isomorphism
$$\bar{T}:=T|_{{\mathcal{N}(T)}^{\perp}}: {\mathcal{N}(T)}^{\perp} \longrightarrow   \mathcal{R}(T).$$
Moreover, $T^{+}$ is the unique solution of the four ''Moore-Penrose equations'':
$$TXT = T,\quad XTX = X,\quad XT = P_{N{(T)^{\bot}}}\,\,\mbox{and}\,\,\quad TX = P_{\overline{\mathcal{R}(T)}}{{|}_{D(T^{+})}}.$$
Here $\mathcal{R}(T)$ and $\mathcal{N}(T)$ denote respectively the range and the nullspace of $T$. Also $P_{F}$ denote the orthogonal projection onto $F$.

It is well know that $A^+$ is bounded iff $A$ has a closed range.
  
  
*
  
*If $A$ is selfadjoint matrix, then
  $$ A^{+}= \lim_{t \to 0}(A^2+tI)^{-1} A.\;\;(1).$$
  
*If $A$ is not selfadjoint, then $A^+=A^*(AA^*)^+$ (which is equal to $(A^*A)^+A^*$).
Is the formula $(1)$ true only for matrix or even for Hilbert space operators? Let for example $S$ an operator on $\ell^2$ given by 
  $$S(x_1,x_2,\cdots)=(x_1,\tfrac{1}{2} x_2,\tfrac{1}{3} x_3,\cdots).$$
  How can I find $S^+$?

 A: What may be tripping you up here is that $T^+$, as you have defined it, could be unbounded, if the range of $T$ is not closed. So the answer to

Is the formula (1) true only for matrix or even for Hilbert space operators?

is ... sort of, depending on what you mean by taking a limit. I'm not sure there's any standard notion of convergence for unbounded operators. But you can make sense of (1) as a strong limit on the domain of $T^+$.
Your second question is easier: $S^+(x_1, x_2, x_3, \ldots) = (x_1, 2x_2, 3x_3, \ldots)$, with domain the set of sequences in $l^2$ for which that target sequence also belongs to $l^2$.
A: This is an addendum to the above answer, but too long for a comment.  Firstly, there is a very simple proof if one is prepared to use the spectral theorem in the form that each (possibly unbounded) self-adjoint operator is representable as multiplication by a measurable function $x$ on an $L^2$-space.  Then the Moore-Penrose inverse is multiplication by the function which is $\dfrac 1 x$ on the set where $x$ is non-zero and $0$ otherwise.  As regards the convergence, the one mentioned in the response has the disadvantage that it depends on the operator.  However, there is a natural topology on the space of observables (i.e., unbounded, self-adjoint operators on a Hilbert space) under which it is a Polish space (for separable Hilbert spaces) and under which your question has a positive response. This is the relevant one for working with the observables (which play, in quantum theory, the role of the real numbers), typically in questions involving the key notion of perturbation theory (of which your question is a typical example).
