6. Let the complex number $z$ satisfy $|z|=1$, such that the equation $z x^{2}+2 \bar{z} x+2=0$ has real roots, then the sum of such complex numbers $z$ is $\qquad$ .
Let $z=a+b \mathrm{i}(a, b \in \mathbf{R})$, then $(a+b \mathrm{i}) x^{2}+2(a-b \mathrm{i}) x+2=0$
$$
\Rightarrow\left\{\begin{array}{ll}
a x^{2}+2 a x+2=0, & \text { (1) } \\
b x^{2}-2 b x=0 & \text { (2) }
\end{array} \Rightarrow b x(x-2)=0\right. \text {. }
$$

When $b=0$, from $a^{2}+b^{2}=1 \Rightarrow a= \pm 1$. Substituting into (1) gives $a=1$ with no solution for $x$, so $a=-1$ $\Rightarrow z=a+b \mathrm{i}=-1$; When $x=0$, substituting into (1) gives $2=0$ with no solution;
When $x=2$, substituting into (1) gives $a=-\frac{1}{4} \Rightarrow b= \pm \frac{\sqrt{15}}{4} \Rightarrow z=a+b \mathrm{i}=-\frac{1}{4} \pm \frac{\sqrt{15}}{4} \mathrm{i}$. Therefore, the sum of the complex numbers $z$ that satisfy the condition is $-\frac{3}{2}$.