I know that, if $H$ is a Hilbert space, for any continuous linear functional $f\in H^{\ast}$ there is a unique element $x_0\in H$ such that $\forall x\in H\quad f(x)=\langle x,x_0\rangle$. Moreover, $\|f\|=\|x_0\|$. Conversely, for any $x_0\in H$, the form $f=\langle -,x_0\rangle$ defines a continuous linear functional such that $\|f\|=\|x_0\|$. Therefore $x_0\mapsto\langle -,x_0\rangle$ is a conjugate linear isomorphism between $H$ and $H^{\ast}$.
The proof I know seems to me not to use separability nor finite dimension of the space $H$. Is the theorem valid for finite dimensional Euclidean, real or complex, spaces or non-separable Hilbert spaces?
$\infty$ thanks!
Yes, it is valid for any Hilbert space. The key fact you need is that in a complete inner-product space $H$, for each non-void, convex, closed set $C$ and every $x\in H\setminus C$ there is a unique element $c\in C$ such that
$$\mbox{dist}(x,C) = \|x-c\|.$$
In the real case your isomorphism is, of course, linear.