Let
- $H$ be a separable $\mathbb R$-Hilbert space
- $(e_n)_{n\in\mathbb N}$ be an orthonormal basis of $H$
- $(\Omega,\mathcal A,\mu)$ be a finite measure space
- $X:\Omega\to H$
If $X\in\mathcal L^1(\operatorname P,H)$, then clearly $$X_n:=\langle X,e_n\rangle_H\in\mathcal L^1(\operatorname P)\;\;\;\text{for all }n\in\mathbb N\tag1\;.$$ On the other hand, $(1)$ and $$\left\|X-\sum_{n=1}^NX_ne_n\right\|_H\xrightarrow{n\to\infty}0\tag2$$ imply that $X$ is at least $\mathcal A$-$\mathcal B(H)$-measurable. But does $(1)$ yield the integrability of $X$ too? This is clearly the case, if $H$ is finite dimensional, but otherwise the problem seems to be that we cannot invoke the dominated convergence theorem, since the sequence in $(2)$ is missing a dominating integrable function.
No, this need not be the case. Let $H=\ell^2$ and $\Omega=[0,\infty)$ with the Lebesgue measure. Let $X=(\mathbf1_{[n,n+1]})_{n\in\mathbb N}$, and let $(e_n)$ be the standard basis. Then $X_n=\mathbf1_{[n,n+1]}$ which is integrable, but $\|X\|_H=1$ $P$-almost everywhere, so $\int_0^\infty\|X\|_Hdx=\infty$.
EDIT: Originally the question asked for a $\sigma$-finite measure space, not finite. The same idea still works for a counterexample. Instead, let $\Omega=[0,1]$ with the Lebesgue measure and suppose $(a_n)_{n\in\mathbb N}$ is a strictly increasing sequence in $[0,1]$ with $a_0=0$ and $\lim_{n\to\infty}a_n=1$. Let $X=(\frac1{a_{n+1}-a_n}\mathbf1_{[a_n,a_{n+1}]})_{n\in\mathbb N}$. Then $\int_0^1X_ndx=1$ for all $n\in\mathbb N$ and $\int_0^1\|X\|_Hdx=\infty$.