The white noise correlation is:
\[R(\tau)=\frac{N_0}{2}\delta(\tau)\]
So the power spectral density is:
\[\mathcal{S}_{nn}(f)=\int_{-\infty}^{\infty}R(\tau)e^{-j2\pi f\tau}\,d\tau=\frac{N_0}{2}\int_{-\infty}^{\infty}\delta(\tau)e^{-j2\pi f\tau}\,d\tau=\frac{N_0}{2}\]
and the autocorrelation is then:
\[R(\tau)=\int_{-\infty}^{\infty}\mathcal{S}_{nn}(f)e^{j2\pi f\tau}\,df\]
The average power is then:
\[R(0)=\sigma_n^2=\int_{-\infty}^{\infty}\mathcal{S}_{nn}(f)\,df=\int_{-\infty}^{\infty}\frac{N_0}{2}\,df\]
Now as zorro pointed out, the average power is taken over the bandwidth of interest. So:
\[\sigma_n^2=\int_{-W}^{W}\frac{N_0}{2}\,df=N_0W\]
Then the SNR will be:
\[\text{SNR}=\frac{P}{\sigma_n^2}=\frac{P}{N_0W}=\frac{PT}{N_0}=\frac{E}{N_0}\]
Hope this will help.
Regards