Let $S$ be the sum with the quadratic in the denominator. As user Ron Gordon points out in the linked question,
$$\begin{align*}
S &= \sum_{k=1}^{\infty} \frac{(-1)^{k+1} (2 k-1)}{k^2-k+1} \\
&= -\frac12 \sum_{k=-\infty}^{\infty} \frac{(-1)^{k} (2 k-1)}{k^2-k+1}
\end{align*}$$
Take out the $k=0$ term and split up the sum by the sign of the index, then condense into a single sum over positive indices.
$$\begin{align*}
S &= \frac12 - \frac12 \left\{\sum_{k=-\infty}^{-1} + \sum_{k=1}^\infty\right\} (-1)^k \frac{2k-1}{k^2-k+1} \\
&= \frac12 - \frac12 \sum_{k=1}^\infty (-1)^{-k} \frac{-2k-1}{k^2+k+1} - \frac12 \sum_{k=1}^\infty (-1)^k \frac{2k-1}{k^2-k+1} \\
&= \frac12 - \frac12 \sum_{k=1}^\infty (-1)^k \frac{k^2-1}{k^4+k^2+1} \\
&= \frac12 + \frac12 \sum_{k=1}^\infty (-1)^{k+1} \frac{k^2-1}{k^4+k^2+1}
\end{align*}$$
Expand the summand into partial fractions.
$$\frac{k^2-1}{k^4+k^2+1} = \frac{e^{i\pi/3}}{e^{-i\pi/3}+k^2} + \frac{e^{-i\pi/3}}{e^{i\pi/3}+k^2}$$
Noting that $e^{\pm i\pi/3}=\mp e^{\mp i2\pi/3}$ and $\dfrac12=\cos\left(\dfrac\pi3\right)=\dfrac{e^{i\pi/3}+e^{-i\pi/3}}2$, we can write
$$\begin{align*}
S &= \frac{e^{i\pi/3}+e^{-i\pi/3}}2 + \frac12 \sum_{k=1}^\infty (-1)^{k+1} \left[\frac{e^{i\pi/3}}{e^{i2\pi/3}-k^2} + \frac{e^{-i\pi/3}}{e^{-i2\pi/3}-k^2}\right] \\
&= \left[\frac1{2e^{-i\pi/3}} + \frac12 \sum_{k=1}^\infty (-1)^{k+1} \frac{e^{i\pi/3}}{\left(e^{i\pi/3}\right)^2-k^2}\right] + \left[\frac1{2e^{i\pi/3}} + \frac12 \sum_{k=1}^\infty (-1)^{k+1} \frac{e^{-i\pi/3}}{\left(e^{-i\pi/3}\right)^2-k^2}\right]
\end{align*}$$
Comparing to the partial fraction expansion for $\csc$, the result follows,
$$S = \frac\pi2 \left[\csc\left(\pi e^{-i\pi/3}\right) + \csc\left(\pi e^{i\pi/3}\right)\right]$$
which we can rewrite as
$$S = \pi \sec\left(i\frac{\pi\sqrt3}2\right) = \pi\operatorname{sech}\left(\frac{\pi\sqrt3}2\right)$$
A quicker solution would be to complete the square in the denominator and compare against the partial fraction expansion of $\operatorname{sech}$.