6. Let the complex number $z$ satisfy $|z|=1$, such that the equation $z x^{2}+2 z x+2=0$ has real roots. Then the sum of such complex numbers $z$ is $\qquad$ .


6. $-\frac{3}{2}$.
Let $z=a+b \mathrm{i}\left(a, b \in \mathbf{R}, a^{2}+b^{2}=1\right)$.
Change the original equation to
$$
\left(a+b \text { i) } x^{2}+2(a-b \text { i }) x+2=0\right. \text {. }
$$

Separating the real and imaginary parts, it is equivalent to
$$
\left\{\begin{array}{l}
a x^{2}+2 a x+2=0, \\
b x^{2}-2 b x=0 .
\end{array}\right.
$$

If $b=0$, then $a^{2}=1$.
But when $a=1$, equation (1) has no real solutions.
Thus, $a=-1$, in which case there exist real numbers $x=-1 \pm \sqrt{3}$ satisfying equations (1) and (2).
Therefore, $z=-1$ satisfies the condition.
If $b \neq 0$, from equation (2) we know $x \in\{0,2\}$, but clearly $x=0$ does not satisfy equation (1), so $x=2$.
Substituting into equation (1) yields
$$
\begin{array}{l}
a=-\frac{1}{4} \Rightarrow b= \pm \frac{\sqrt{15}}{4} \\
\Rightarrow z=\frac{-1 \pm \sqrt{15} \mathrm{i}}{4} .
\end{array}
$$

In summary, the sum of all complex numbers $z$ that satisfy the condition is
$$
-1+\frac{-1+\sqrt{15} \mathrm{i}}{4}+\frac{-1-\sqrt{15} \mathrm{i}}{4}=-\frac{3}{2} .
$$