Mittag-Leffler's theorem guarantees the existence of a meromorphic function $g(z)$ whose poles and principal parts are given by any values specified. Then, if $f(z)$ is a meromorphic function, then $f(z) - g(z)$ is holomorphic, and it remains to compute this difference. In practice this is probably nontrivial, because $g(z)$ is not uniquely determined, but for functions with nice poles and principal parts, this is possible.
Such a possibility applies in your case with $f(z) = 1/(e^z + 1)$. We can justify the formula you gave in your question by using an approach based on a discussion between me and one of my friends, so I do not claim the credit for these ideas.
In order to properly handle the convergence of the infinite sum, we should first symmetrize the infinite sum you gave, so instead let
$$ g(z) = \sum_{k > 0 \text{, odd}} \left( \frac{1}{k i \pi - z} - \frac{1}{k i \pi + z} \right) = -\sum_{k > 0 \text{, odd}} \frac{2z}{z^2 + k^2 \pi^2}$$
We can check that $g(z)$ is a meromorphic function whose poles and principal parts match that of $f(z) = 1/(e^z + 1)$, so it follows that $f(z)- g(z)$ is entire. It remains to compute this difference. First, notice that both $f(z)$ and $g(z)$ are $2 \pi i$ periodic. So to check the growth of $f(z), g(z)$, we need only check the behavior as $\mathrm{Re}(z) \rightarrow \pm \infty$. Notice that $f(z) \rightarrow 1,0$ as $\mathrm{Re}(z) \rightarrow -\infty, +\infty$, respectively. Thus it follows that $f(z)$ is in fact uniformly bounded away from its poles. To check $g(z)$, split the sum as
$$ g(z) = \sum_{0<k<2|z|/\pi, \text{ odd}} + \sum_{k \ge 2|z|/\pi, \text{ odd}} \frac{-2z}{z^2 + k^2 \pi^2} = S_1(z) + S_2(z)$$
Now, notice that for $\mathrm{Re}(z)$ sufficiently large,
\begin{align}
|S_1(z)| & = \left|\frac{-2}{z} \sum_{0<k<2|z|/\pi, \text{ odd}} \frac{1}{1 + k^2 \pi^2/z^2} \right| \le \frac{2}{|z|} \frac{2|z|}{\pi} = 4,\\
|S_2(z)| & = \left| \sum_{k \ge 2|z|/\pi, \text{ odd}} \frac{-2z}{z^2 + k^2 \pi^2} \right| \\
& \le \frac{8}{3} |z| \sum_{k \ge 2|z|/\pi, \text{ odd}} \frac{1}{ \pi^2 k^2} \\
& \le \frac{8}{3} |z| \int_{-1 + 2|z|/\pi}^{\infty} \frac{1}{\pi^2 s^2} \, ds \\
& \le \frac{8}{3} \frac{|z|}{-1 + 2|z|/\pi} \le C
\end{align}
for $C > 0$ a constant. Thus $g(z)$ is also uniformly bounded away from its poles. Then, it follows that the difference $f(z) - g(z)$ is uniformly bounded, and being entire, then by Louiville's theorem it must be constant. Now, we compute that
$$ f(0) - g(0) = \frac{1}{2} - 0 = \frac{1}{2} $$
and hence $f(z) - g(z) \equiv 1/2$.