Let $A$ be a $C^\ast$-algebra, $a\in A$. Equivalent: $a\ge 0 \iff$ for all states $\varphi\in S(A)$ is $\varphi(a)\ge 0$.
First of all $S(A)$ is the state space of $A$, i.e. all positive linear functional with norm 1.
The direction $\Rightarrow$ is clear.
I need help to finish the proof of $\Leftarrow$: Let $\varphi\in S(A)$ arbritrary such that $\varphi(a)\ge 0$. It is $a=Re(a)+iIm(a)$ with $Re(a), Im(a)\in A$ self-adjoint. We obtain: $\varphi(a)=\varphi(Re(a))+i\varphi(Im(a))\ge 0$ and therefore it is $\varphi(Im(a))=0$ for arbitrary $\varphi\in S(A)$.
Now, $Im(a)\in A$ is normal, we had a result in lecture which gives us that there exists a state $varphi\in S(A)$ such that $|\varphi(Im(a))|=\|Im(a)\|$. But it is $|\varphi(Im(a))|=\|Im(a)\|=0$ and therefore $Im(a)=0$. We obtain $a=Re(a)$ and $a$ is self-ajoint.
Now I dont know how to continue. Maybe we can use the continuous functional calculus of $a$, but I have no idea how to prove that $a$ is positive.
Do you know how to prove $\Leftarrow$ or how to continue my try above?
Now that you know that $a$ is selfadjoint, you have $C^*(a)\simeq C(\sigma(a))$ and the states are precisely the point evaluations. So now $\varphi(a)\geq0$ for all $\varphi\in S(A)$ reads $\hat a(t)\geq0$ for all $t\in \sigma(a)$, i.e. the function $\hat a$ is positive. Then $a$ is positive.