I am trying to evaluate the power spectral density $S_{xx}(f)$ of a cosine signal $x(t) = A\cos(2\pi f_0t)$, by starting from its definition for deterministic power signals $$S_{xx}(f) = \lim_{T\rightarrow\infty}\frac{1}{T}\left|X_{T}(f) \right|^2\;, \tag{1}$$ where $X_T(f)$ is the Fourier transform of a signal $x(t)$ which has been truncated to a time window $T$, given by $$X_T(f) = \int_{-T/2}^{T/2}x(t)\;e^{-2\pi if t}\;dt \;.\tag{2}$$
I know that the answer should be $$S_{xx}(f) = \frac{A^2}{4}\bigg[\delta(f-f_o) + \delta(f+f_o)\bigg]\;,\tag{3}$$ but I am stuck with my working. Can anyone check it so far, and help me fill in the gaps? Perhaps my mathematics is not as good as it ought to be!
\begin{align} S_{xx}(f) &= \lim_{T\rightarrow\infty}\frac{1}{T}\left|X_{T}(f) \right|^2\ \tag{4} \\ &= \lim_{T\rightarrow\infty}\frac{1}{T}\left[ \int_{-T/2}^{T/2}x(t)\;e^{-2\pi if t}\;dt \int_{-T/2}^{T/2}x^\ast(t')\;e^{2\pi if t'}\;dt' \right] \tag{5} \\ &= \lim_{T\rightarrow\infty}\frac{1}{T}\left[ \int_{-T/2}^{T/2}\int_{-T/2}^{T/2} A^2\cos(2\pi f_0t)\cos(2\pi f_0t')\;e^{2\pi if(t'-t)}\;dt \;dt'\right] \tag{6} \\ &= \lim_{T\rightarrow\infty}\frac{A^2}{2T}\left[ \int_{-T/2}^{T/2}\int_{-T/2}^{T/2} \Big[\cos\big(2\pi f_0(t+t')\big) + \cos\big(2\pi f_0(t'-t)\big)\Big]\;e^{2\pi if(t'-t)}\;dt \;dt'\right] \tag{7} \end{align} where the last line is obtained by using the product-to-sum identity for cosines. Now, I'm a little stuck. I can make the substitution $\tau = t'-t$, which simplifes the exponential
$$ S_{xx}(f) = \lim_{T\rightarrow\infty}\frac{A^2}{2T}\left[ \int_{-T/2-t}^{T/2-t}\int_{-T/2}^{T/2} \Big[\cos\big(2\pi f_0(2t+\tau)\big) + \cos\big(2\pi f_0\tau\big)\Big]\;e^{2\pi if\tau}\;dt \;d\tau\right] \tag{8} $$
but now I am not sure how to proceed. I can also replace my cosines with complex exponentials to obtain
$$\lim_{T\rightarrow\infty}\frac{A^2}{4T}\left[ \int_{-T/2}^{T/2}\int_{-T/2}^{T/2} \Big[ e^{2\pi if_0(t+t')} + e^{2\pi if_0(t-t')} +e^{2\pi if_0(t'-t)}+e^{-2\pi if_0(t+t')} \Big]\;e^{2\pi if(t'-t)}\;dt \;dt'\right]$$
Can someone teach me how to finish this? Ideally I would like it if someone could show me how to evaluate it in terms of $T$, and then show how the $\delta$ functions arise as we finally take the limit $T\rightarrow\infty$.