From the fact that $P$ is selfadjoint, you can deduce that $u_1,\ldots,u_k$ are orthonormal: for $j\ne m$,
$$
\lambda_j\langle u_j,u_m\rangle=\langle Pu_j,u_m\rangle=\langle u_j,Pu_m\rangle=\lambda_m\langle u_j,e_m\rangle.
$$
So $\langle u_j,u_m\rangle=0$. And then $Pu_j=\lambda_j\|u_j\|^2\,u_j$, so $\|u_j\|=1$.
Then you can take
$$
p(x,y)=\sum_{j=1}^k\lambda_j u_j(x)u_j(y).
$$
You have
$$
\int_0^1\sum_{j=1}^k\lambda_j u_j(x)u_j(y)\,f(y)\,dy=\sum_{j=1}^k\lambda_j u_j(x)\int_0^1 u_j(y)\,f(y)\,dy=\sum_{j=1}^k\lambda_j \langle u_j,f\rangle\,u_j(x)=(Pf)(x).
$$
Lemma: Let $X,Y$ be Banach spaces. If $T_n:X\to Y$ are bounded operators with finite dimensional range and $T_n\to T\in B(X,Y)$ in operator norm, then $T$ is a compact operator.
For the case $X=Y=L^p$, $1< p\le\infty$, we will write $T$ as a norm limit of finite rank operators and deduce compactness of $T$ by the above lemma.
Let $n>1$ be an integer and partition the interval $[0,1]$ in $n$ subintervals of equal length, namely $I_{j,n}:=[\frac{j-1}{n},\frac{j}{n})$, $j=1,\dots,n$. Let $\phi_{j,n}$ denote the indicator function of $I_{j,n}$. Set
$$T_n:L^p[0,1]\to L^p[0,1], \;\;\;T_n(f)=\sum_{j=1}^n\bigg(\int_0^{\frac{j}{n}}f(t)dt\bigg)\cdot\phi_{j,n}$$
Note that the operator $T_n$ has automatically finite dimensional range, since $T_n(f)$ lies in the linear span of the functions $\{\phi_{j,n}:j=1,\dots,n\}\subset L^p[0,1]$. Also,
for $x\in[0,1]$ there exists a unique $j_x\in\{1,\dots,n\}$ such that $x\in I_{j_x,n}$ so $\phi_{i,n}(x)=1$ if and only if $i=j_x$. So
$$|T_n(f)(x)|^p=\bigg|\sum_{j=1}^n\bigg(\int_0^{\frac{j}{n}}f(t)dt\bigg)\cdot\phi_{j,n}(x)\bigg|^p=\bigg|\int_0^{\frac{j_x}{n}}f(t)dt\bigg|^p\le\bigg(\int_0^1|f(t)|dt\bigg)^p\le\|f\|_p^p$$
where in the last inequality we have used the fact that $\|f\|_1\le\|f\|_p$ for $f\in L^p[0,1]$. Thus
$$\|T_n(f)\|_p^p=\int_0^1|T_n(f)(x)|^pdx\le\int_0^1\|f\|_p^pdx=\|f\|_p^p$$
and thus $\|T_n\|\le1$, so $T_n$ are indeed bounded operators with finite rank.
We now show that $\|T_n-T\|_p\to0$. Indeed, we have
$$|T_n(f)(x)-T(f)(x)|^p=\bigg|\sum_{j=1}^n\int_0^{\frac{j}{n}}f(t)dt\cdot \phi_{j,n}(x)-\int_0^xf(t)dt\bigg|^p=$$ $$=\bigg|\int_0^\frac{j_x}{n}f(t)dt-\int_0^xf(t)dt\bigg|^p\;\;(\star)$$
where $j_x\in\{1,\dots,n\}$ is the unique integer such that $x\in I_{j_x,n}$ (and the above equality occurs because $\phi_{j_x,n}(x)=1$ and $\phi_{i,n}(x)=0$ for $i\ne j_x$). Continuing from $(\star)$, if we denote by $q$ the conjugate exponent $(1/p+1/q=1)$, we have
$$(\star)=\bigg|\int_x^{\frac{j_x}{n}}f(t)dt\bigg|^p\le\bigg|\int_0^1\chi_{I_{j_x,n}}(t)f(t)dt\bigg|^p\le$$ $$\le\bigg(\int_0^1\chi_{I_{j_x,n}}(t)\cdot|f(t)|dt\bigg)^p\le\bigg(\mu(I_{j_x,n})^{1/q}\cdot\|f\|_p\bigg)^p=\frac{1}{n^{p/q}}\cdot\|f\|_p^p$$
where we used Holder's inequality. Therefore,
$$\|T_n(f)-T(f)\|_p^p=\int_0^1|T_n(f)(x)-T(f)(x)|^pdx\le\int_0^1\frac{1}{n^{p/q}}\cdot\|f\|_p^pdt=\frac{1}{n^{p/q}}\cdot\|f\|_p^p$$
and thus $\|T_n-T\|_p\le\frac{1}{n^{1/q}}$. Letting $n\to\infty$ gives $T_n\to T$.
P.S:
Why it is reasonable to define the operators $T_n$ the way we did? First, we need them to have finite dimensional range. Second, we look at $T(f)(x)=\int_0^xf(t)dt$. This is a number very close to $\int_0^{j/n}f(t)dt$ for some suitable $j,n$. So it feels natural to partition the unit interval in small intervals of length $1/n$ and define $T_n(f)$ by the rule "take a $x$, determine in which small interval it lies (i.e. find the proper $j_x$), then assign the value $\int_0^{j_x/n}f(t)dx$. Implicitly we have been multiplying with $\phi_{j,n}$ and adding up, to make sure we evetually obtained the correct $j_x$. I hope this helps you understand the reasoning here.
Best Answer
Just notice that $L^{2}$ is separable. And if you have eigenvectors $\{f_i;i<n\}$, then you can retrict T to the orthogonal complement $M_n$ of the subspace spanned by $\{f_i;i<n\}$, because T is self-adjoint, it maps $M_n$ to $M_n$ itself. At last you only have to show that the restriction of T must have a eigenvector(which follows from the compactness). For the same eigenvalue you can always choose the eigenvectors orthogonal to each other(because the eigenspace would be finite dimensional if the eigenvalue is not 0). If the closed linear span S of eigenvectors of T doesn't contain $L^2$ then by considering the orthogonal complement of S you will get a contradiction.