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. 



Bochner integral of stochastic process = path by path Lebesgue integral?
Yes, the Bochner integral does agree with the Lebesgue integral of the sample paths of the process. We can prove this in a slightly more general situation than that asked for in the question.


For a probability space $(\Omega,\mathcal{F},\mathbb{P})$, let $X\colon[0,T]\to L^p(\mathbb{P})$ ($1\le p\le\infty$) be Bochner integrable w.r.t the Lebesgue measure on $[0,T]$, and also jointly measurable as a map $(t,\omega)\mapsto X(t)(\omega)$ from $[0,T]\times\Omega$ to $\mathbb{R}$.
Then, the Bocher integral $\int\_0^T X(t)\,dt$ agrees with the pathwise Lebesgue integral $\int\_0^TX(t)(\omega)\,dt$ for almost every $\omega$.


First, this statement clearly holds for simple functions, which are finite linear combinations of terms of the form $X(t)(\omega)=1\_{\lbrace t\in A\rbrace}1\_{\lbrace\omega\in B\rbrace}$, for $A$ a Borel subset of $[0,T]$ and $B$ in $\mathcal{F}$. Now, by definition, if $X$ is Bochner integrable then, for each $n\ge1$, there is a simple $\xi\_n$ such that
$$
\int\_0^T\lVert X(t)-\xi\_n(t)\rVert\_p\,dt\le2^{-n}.
$$
The Bochner integral is given by
$$
\int\_0^T\xi\_n(t)\,dt \rightarrow\text{(B-)}\int\_0^T X(t)\,dt.
$$
Here the limit is taken in the $L^p$ norm and, hence, also holds for convergence in probability.


Using pathwise Lebesgue integration along the sample paths of $X$ now, we can use Fubini's theorem to commute expectation, integration and summation signs.
$$
\begin{align}
\mathbb{E}\left[\int\_0^T\sum\_{n=1}^\infty\left\lvert X(t)-\xi\_n(t)\right\rvert\,dt\right]
&=\sum\_{n=1}^\infty\int\_0^T\mathbb{E}\left[\lvert X(t)-\xi\_n(t)\rvert\right]\,dt\cr
&\le\sum\_{n=1}^\infty\int\_0^T\left\lVert X(t)-\xi\_n(t)\right\rVert\_p\,dt\cr
&\le\sum\_{n=1}^\infty2^{-n}=1 < \infty.
\end{align}
$$
In particular,
$$
\int\_0^T\sum\_{n=1}^\infty\left\lvert X(t)-\xi\_n(t)\right\rvert\,dt < \infty
$$
with probability one. Looking at any sample path for which this is finite, $\lvert X(t)-\xi\_n(t)\rvert\to0$ as $n\to\infty$ for Lebesgue almost every $t$. Also, $\lvert X(t)-\xi\_n(t)\rvert$ is dominated by its sum over $n$. Therefore dominated convergence applies,
$$
\int\_0^T\xi\_n(t)\,dt\rightarrow\textrm{(L-)}\int\_0^T X(t)\,dt.
$$
This holds for almost every sample path of $X$, so the limit holds in probability. Hence the Lebesgue integral on sample paths agrees with the Bochner integral.


