After some helpful comments, I realized that I had to repost this question in a more systematic way.

On a complete probability space, let $\mathcal{H}_0$ denote the Hilbert space of square integrable random variables with zero mean. A stochastic process $X$ is called a second order process if $\mathbf{E}X(t)^2 < \infty$ and $\mathbf{E}X(t) = 0$, all $t \in [0,T]$. Such a process can be regarded as a map $[0,T] \rightarrow \mathcal{H}_0$. It is called q.m. continuous if this map is continuous, i.e. $X(s) \rightarrow X(t)$ in quadratic mean as $s \rightarrow t$. One can show that each q.m. continuous process has a measurable version.

Let $X$ be a q.m. continuous second order process. We want to compute the integral $\int_0^T X(s) \mathrm{d} s$. There are two ways.

**Bochner integral.** Clearly, $X$ considered as a continuous map $[0,T] \rightarrow \mathcal{H}_0$ is Bochner integrable. We denote its Bochner integral by
\begin{equation}
\text{(B-)}\int_0^T X(s) \mathrm{d}s.
\end{equation}

**Lebesgue integral.** We may assume that $X$ considered as a map $[0,T] \times \Omega \rightarrow \mathrm{R}$ is measurable. Thus, for fixed $\omega$, the integral $\int_0^T X(s,\omega) \mathrm{d} s$ exists as a Lebesgue integral, and we denote the random variable constructed in this way by
\begin{equation}
\text{(L-)}\int_0^T X(s) \mathrm{d}s.
\end{equation}

**Question.** Do we have
\begin{equation}
\text{(B-)}\int_0^T X(s) \mathrm{d}s = \text{(L-)}\int_0^T X(s) \mathrm{d}s \quad \text{a.s.?}
\end{equation}

**Ideas.**
Let $\lbrace t^n = t_0^n, \ldots t_{k_n}^n \rbrace$ be a sequence of partitions of $[0,T]$ with mesh going to zero. Define the simple functions
\begin{equation}
\xi_n = X(t_0^n)1[t_0^n,t_1^n] + \sum_{i=1}^{k_n-1} X(t_i^n) 1[t_i^n, t_{i+1}^n).
\end{equation}
Then one can show that for almost every $t$, we have $\xi_n(t) \rightarrow X(t)$ in $\mathcal{H}_0$, and
\begin{equation}
\int_0^T \xi_n(s) \mathrm{d}s \rightarrow \text{(B-)}\int_0^T X(s) \mathrm{d}s
\quad \text{in $\mathcal{H}_0$},
\end{equation}
where the integral on the left is defined in the obvious way (we omit (B-)) (to show this, one uses the fact that the covariance function $r(s,t) = \mathbf{E}X(s)X(t)$ of a q.m. continuous process is continuous). After switching to a subsequence if necessary, we may assume that
\begin{equation}
\int_0^T \xi_n(s) \mathrm{d}s \rightarrow \text{(B-)}\int_0^T X(s) \mathrm{d}s
\quad \text{$\mathbf{P}$-a.s.},
\end{equation}
Now, we would like to have that also
\begin{equation}
\int_0^T \xi_n(s) \mathrm{d}s \rightarrow \text{(L-)}\int_0^T X(s) \mathrm{d}s
\quad \text{$\mathbf{P}$-a.s.},
\end{equation}
But this is tricky. The sums on the left hand side are Riemann sums, i.e.
\begin{equation}
\int_0^T \xi_n(s) \mathrm{d}s = \sum_{i=0}^{k_n-1} X(t_i^n)(t_{i+1}^n - t_i^n ).
\end{equation}
So if we knew that the paths of $X$ are a.s. Riemann integrable, we would be done. But this is not clear. I also tried to use some approximation arguments, but couldn't do it. It seems like one needs to deduce some kind of path regularity of $X$ from the assumption of q.m. continuity, but I don't know any results in this direction.

4more comments