I know that a function $f_a\in \text{L}^2(\mathrm{R})$ is an analytic signal if its Fourier transform is 0 for negative frequencies, i.e.
$$ \hat{f_a}(\omega)=0$ if $\omega<0 $$
We can characterize an analytic function by its real part $f = \text{Re}[f_a]$, and the Fourier transform of this function is
$$ \hat{f_a}(\omega)=\left\{\begin{matrix} 2\hat{f}(\omega) & \text{if }\omega\geq0 \\ 0 & \text{if }\omega<0 \end{matrix}\right. $$
Now if we have a discrete signal $f[n]$ of size $N$, we can also compute $f_a[n]$ by setting the negative frequency components of its discrete Fourier transform to 0.
Now why is it that if we want $\text{Re}[f_a]=f$, then we must have:
$$ \hat{f_a}[k]=\left\{\begin{matrix} \hat{f}[k] && \text{if }k=0,N/2\\ 2\hat{f}[k] && \text{if }0<k<N/2\\ 0 && \text{if } N/2<k<N \end{matrix}\right. $$
Could that be explained?