Let $k: [0,T] \times [0,T] \to \mathbb{R}$ symmetric, square-integrable and define $$(Kf)(t) := \int_0^T k(s,t) \cdot f(s) \, ds \qquad (f \in L^2([0,T])$$
Since $K$ is compact, by the spectral theorem, there exists a orthonormal system $(\varphi_j)_j$ in $L^2([0,T])$ of eigenfunctions of $K$ with corresponding eigenvalues $\lambda_j$, and
$$Kf = \sum_{j} \lambda_j \cdot (f|\varphi_j)_{L^2([0,T])} \cdot \varphi_j \tag{1}$$ (the series converges in $L^2([0,T])$).
My question is the following: What are sufficient conditions to conclude that the kernel $k$ admits the representation
$$k(s,t) = \sum_{j} \lambda_j \cdot \varphi_j(s) \cdot \varphi_j(t)$$
Mercer's theorem applies to continuous, non-negative definite kernels, but in my case, $k$ is not continuous (and also not in $L^{\infty}([0,T] \times [0,T])$).
I would like to apply this in the following framework: Given a Gaussian process $(X_t)_{t \in [0,T]}$, mean $0$, covariance $k(s,t) := \mathbb{E}(X_s \cdot X_t)$,
$$(Kf)(t) := \int_0^T k(s,t) \cdot f(s) \, ds \qquad (f \in L^2([0,T]))$$
and it is assumed that $K$ has finite trace. It is known that the paths $t \mapsto X_t(w)$ are in $L^2([0,T])$, $K$ is non-negative definit and admits a (non-negative symmetric) square root $K^{\frac{1}{2}}$.
As far as I can see, the square-integrability and symmetry of the kernel are sufficient conditions:
Denote by $\varphi_j \otimes \varphi_j(s,t) := \varphi_j(s) \cdot \varphi_j(t)$. By definition, $\varphi_j$ is an eigenfunction of $K$ with corresponding eigenvalue $\lambda_j$, so
$$(k|\varphi_j \otimes \varphi_j)_{L^2([0,T] \times [0,T]} = \int_0^T \int_0^T k(s,t) \cdot \varphi_j(s) \cdot \varphi_j(t) \, ds \, dt = \lambda_j \cdot \int_0^T \varphi_j(t) \cdot \varphi_j(t) \, dt = \lambda_j$$
Since $(\varphi_j \otimes \varphi_j)_k$ is orthonormal in $L^2([0,T] \times [0,T])$ and $k \in L^2([0,T] \times [0,T])$ we obtain
$$\sum_{j} \lambda_j^2 = \sum_j |(k|\varphi_j \otimes \varphi_j)_{L^2([0,T] \times [0,T]}|^2 \leq \|k\|_{L^2}^2<\infty$$
by applying Bessel's inequality. This implies that the series
$$\tilde{k} := \sum_{j} \lambda_j \cdot \varphi_j \otimes \varphi_j \tag{2}$$
converges in $L^2([0,T] \times [0,T])$. Consequently,
$$\begin{align*} (Kf,g)_{L^2([0,T]} &\stackrel{(1)}{=} \sum_{j} \lambda_j \cdot (f|\varphi_j)_{L^2([0,T])} \cdot (\varphi_j|g)_{L^2([0,T])} \\ &= \sum_j \lambda_j \cdot (f \otimes g|\varphi_j \otimes \varphi_j) \\ &\stackrel{(2)}{=} (f \otimes g|\sum_j \lambda_j \cdot \varphi_j \otimes \varphi_j) \\ &\stackrel{\text{def}}{=} \int_0^T \int_0^T \sum_j \lambda_j \cdot f(s) \cdot \varphi_j(s) \cdot \varphi_j(t) \cdot g(t) \, ds \, dt \\ &= \left( \int_0^T \tilde{k}(s,\cdot) \cdot f(s) \, ds, g \right)_{L^2([0,T])} \end{align*}$$
for any $f,g \in L^2([0,T])$. Thus,
$$(k|f \otimes g)_{L^2([0,T] \times [0,T])} = (\tilde{k}|f \otimes g)_{L^2([0,T] \times [0,T])}$$
Since $\{f \otimes g; f,g \in L^2\}$ is dense in $L^2([0,T] \times [0,T])$, we conclude $k=\tilde{k}$ almost everywhere.