5. Given distinct complex numbers $m, n$ satisfying $m n \neq 0$, the set $\left\{m^{2}, n^{2}\right\}=\{m, n\}$, then $m+n=$

 untranslated portion:
将上面的文本翻译成英文，请保留源文本的换行和格式，直接输出翻译结果。 

Note: The last sentence is a note about the translation request and is not part of the text to be translated. Here is the translation with the note removed:

5. Given distinct complex numbers $m, n$ satisfying $m n \neq 0$, the set $\left\{m^{2}, n^{2}\right\}=\{m, n\}$, then $m+n=$
If $\left\{\begin{array}{l}m^{2}=m, \\ n^{2}=n\end{array} \Rightarrow m=0\right.$ or 1, and $m \neq n$, which contradicts $m n \neq 0$;
If $\left\{\begin{array}{l}m^{2}=n, \\ n^{2}=m\end{array}\right.$ and $m \neq n \Rightarrow m+n=-1 \Rightarrow m^{2}+m+1=0 \Rightarrow m=-\frac{1}{2} \pm \frac{\sqrt{3}}{2} \mathrm{i}$, satisfying the conditions. Therefore, $m+n=-1$.