A conjecture involving roots of unity Motivated by Kevin Liu's recent question, here I pose the following conjecture based on my numerical computation.
Conjecture. Let $m>1$ and $n>1$ be integers. Let $\delta\in\{0,1\}$ and let $\zeta$ be a primitive $(m(n-\delta)-(-1)^{\delta})$-th root of unity. Then, for the sum
$$S:=\sum_{k=1}^{n-1}\left(\frac{\zeta^k}{1+\zeta^{km}}-(-1)^{n-k+\delta}\frac{\zeta^k}{1-\zeta^{km}}\right),$$
its real part is 
$$\text{Re}(S)=(-1)^{n-1}\left\lfloor \frac n2\right\rfloor.$$
The case $\delta=1$ of the conjecture might be handled by the method of Fedor Petrov used in his solution of Liu's question, but the case $\delta=0$ looks challenging. Your comments are welcome!
 A: Motivated by Nemo's solution in the case $\delta=0$, here I provide a proof for the case $\delta=1$. Let $\zeta$ be a primitive $m(n-1)+1$-th root of unity, and consider
$$S=\sum_{k=1}^{n-1}\left(\frac{\zeta^k}{1+\zeta^{km}}+(-1)^{n-k}\frac{\zeta^k}{1-\zeta^{km}}\right) = \sigma_1+(-1)^n\sigma_2,$$ where 
$$\sigma_1=\sum_{k=1}^{n-1}\frac{\zeta^k}{1+\zeta^{km}}\ \ \text{and}\ \ \sigma_2=\sum_{k=1}^{n-1}(-1)^k\frac{\zeta^k}{1-\zeta^{km}}.$$
As $\zeta=\zeta^{m(1-n)}$, we have
\begin{align}\sigma_2=&\sum_{k=1}^{n-1}(-1)^k\frac{\zeta^{km(1-n)}}{1-\zeta^{km}}
=\sum_{k=1}^{n-1}(-1)^k\frac{1+\zeta^{-kmn}-1} {\zeta^{-km}-1}
\\=&\sum_{k=1}^{n-1}\frac{(-1)^k}{\zeta^{-km}-1}+\sum_{k=1}^{n-1}(-1)^k\sum_{s=0}^{n-1}(\zeta^{-km})^s
\\=&\sum_{k=1}^{n-1}\frac{(-1)^k}{\zeta^{-km}-1}+\sum_{s=0}^{n-1}\left(\frac{1-(-\zeta^{-ms})^n}{1+\zeta^{-ms}}-1\right).
\end{align}
Noting $\zeta^{mn}=\zeta^{m-1}$, we see that
\begin{align}\sigma_2=&\sum_{k=1}^{n-1}\frac{(-1)^k}{\zeta^{-km}-1}-\sum_{s=0}^{n-1}\frac{\zeta^{-ms}(1+(-1)^n\zeta^s)}{1+\zeta^{-ms}}
\\=&\sum_{k=1}^{n-1}\frac{(-1)^k}{\zeta^{-km}-1}-\sum_{s=0}^{n-1}\frac1{1+\zeta^{sm}}-(-1)^n\left(\sigma_1+\frac12\right)
\end{align}
and hence 
$S=(-1)^nT-1/2$, where 
$$T=\sum_{k=1}^{n-1}\frac{(-1)^k}{\zeta^{-km}-1}-\sum_{s=0}^{n-1}\frac1{1+\zeta^{sm}}.$$
Clearly,
\begin{align}2\text{Re}(T)=&\sum_{k=1}^{n-1}\left(\frac{(-1)^k}{\zeta^{km}-1}+\frac{(-1)^k}{\zeta^{-km}-1}\right)-\sum_{s=0}^{n-1}\left(\frac1{1+\zeta^{sm}}+\frac1{1+\zeta^{-sm}}\right)
\\=&\sum_{k=1}^{n-1}(-1)^{k-1}-\sum_{s=0}^{n-1}1=-2\left\lfloor\frac{n-1}2\right\rfloor-1.\end{align}
Therefore
$$\text{Re}(S)=(-1)^n\text{Re}(T)-\frac12=(-1)^{n-1}\left(\left\lfloor\frac{n-1}2\right\rfloor+\frac12\right)-\frac12=(-1)^{n-1}\left\lfloor\frac n2\right\rfloor.$$
A: This proves the case $\delta=0$, namely for $z^{mn-1}=1$
$$
S=\sum_{k=1}^{n-1}\left(\frac{z^k}{1+z^{km}}-(-1)^{n-k}\frac{z^k}{1-z^{km}}\right),\quad \text{Re} \,S=(-1)^{n-1}\left\lfloor \frac n2\right\rfloor.
$$
Let's decompose $S$ into 2 parts in an obvious manner
$$
S=S_1-(-1)^nS_2,
$$
where 
$$
S_2=\sum_{k=1}^{n-1}(-1)^{k}\frac{z^k}{1-z^{km}}=\sum_{k=1}^{n-1}(-1)^{k}\frac{z^{kmn}}{1-z^{km}}=\sum_{k=1}^{n-1}\frac{(-1)^{k}}{1-z^{km}}-\sum_{k=1}^{n-1}(-1)^{k}\frac{1-z^{kmn}}{1-z^{km}}\\=\sum_{k=1}^{n-1}\frac{(-1)^{k}}{1-z^{km}}-\sum_{k=1}^{n-1}(-1)^{k}\sum_{s=0}^{n-1}z^{kms}=\sum_{k=1}^{n-1}\frac{(-1)^{k}}{1-z^{km}}+\sum_{s=0}^{n-1}z^{ms}\frac{1-(-1)^{n-1}z^{ms(n-1)}}{1+z^{ms}}\\
=\sum_{k=1}^{n-1}\frac{(-1)^{k}}{1-z^{km}}+\sum_{s=0}^{n-1}z^{ms}\frac{1+(-1)^{n}z^{s-ms}}{1+z^{ms}}=\sum_{k=1}^{n-1}\frac{(-1)^{k}}{1-z^{km}}+\sum_{s=0}^{n-1}\frac{z^{ms}}{1+z^{ms}}+(-1)^{n}\left(\frac12+S_1\right)
$$
Thus
$$
S=\frac{(-1)^{n}}{2}-(-1)^{n}\left(\sum_{k=1}^{n-1}\frac{(-1)^{k}}{1-z^{km}}+\sum_{s=0}^{n-1}\frac{z^{ms}}{1+z^{ms}}\right)
$$
and 
$$
\text{Re}\,S=\frac{(-1)^{n}}{2}-\frac{(-1)^{n}}{2}\left[\sum_{k=1}^{n-1}(-1)^{k}\left(\frac{1}{1-z^{km}}+\frac{1}{1-z^{-km}}\right)+\sum_{s=0}^{n-1}\left(\frac{z^{ms}}{1+z^{ms}}+\frac{z^{-ms}}{1+z^{-ms}}\right)\right]\\
=\frac{(-1)^{n}}{2}-\frac{(-1)^{n}}{2}\left[\sum_{k=1}^{n-1}(-1)^{k}+\sum_{s=0}^{n-1}1\right]=-\frac{(-1)^{n}}{2}\sum_{k=1}^{n-1}\left[(-1)^{k}+1\right]=(-1)^{n-1}\left\lfloor \frac n2\right\rfloor
$$
