A way to continue with your approach is left below.
$\newcommand{\d}{\,\mathrm{d}}$Define a logarithm $\log:\Bbb C^\star\to\Bbb C$ as induced by the choice of argument $-\pi<\arg\le\pi$.
It is claimed that: $$\int_0^{\pi/2}x\csc x\d x=2C$$This is probably very doable with some substitutions and real analytic tricks but I find the complex methods more fun. It suffices to show that: $$J:=\int_{-\pi/2}^{\pi/2}x\csc x\d x\overset{?}{=}4C$$Or, where $\gamma$ is the semicircular contour from $-i$ up to $1$ and then to $i$: $$J=\int_{-\pi/2}^{\pi/2}\frac{-2i\cdot\log(e^{ix})}{(e^{ix})^2-1}(ie^{ix})\d x=-2i\cdot\oint_\gamma\frac{\log s}{s^2-1}\d s$$
By homotopy invariance and the fact that the integrand is holomorphic away from $(-\infty,0]$, we can restate the integral of that contour as one over the following contour(s): fix $0<\delta<1$. Define a contour $\ell_1$ that runs from $-i\to-i\delta$ in a straight line; define a contour $\ell_2$ that runs from $i\delta\to i$ in a straight line, and define a contour $\gamma'$ that runs from $-i\delta$ to $\delta$ to $i\delta$ in a semicircle of radius $\delta$. Then: $$\begin{align}J&=-2i\cdot\left(\int_{\ell_1}\frac{\log s}{s^2-1}\d s+\int_{\ell_2}\frac{\log s}{s^2-1}\d s+\int_{\gamma'}\frac{\log s}{s^2-1}\d s\right)\\&=-2i\cdot\left(i\int_\delta^1\frac{\log(-it)}{-t^2-1}\d t+i\int_\delta^1\frac{\log(it)}{-t^2-1}\d t+i\delta\cdot\int_{-\pi/2}^{\pi/2}\frac{\log(\delta\cdot e^{i\phi})}{\delta^2e^{2i\phi}-1}\cdot e^{i\phi}\d\phi\right)\\&=\underset{o(1),\,\delta\to0^+}{\underbrace{2\delta\cdot\int_{-\pi/2}^{\pi/2}\frac{\ln\delta+i\phi}{\delta^2e^{2i\phi}-1}\d\phi}}-4\int_\delta^1\frac{\ln t}{1+t^2}\d t\end{align}$$
And this will be true for any $0<\delta<1$. Let's decide to take limits as $\delta\to0^+$. Considering $\delta\ln\delta\to0$ as we do that, it's clear that the the first term vanishes. Therefore: $$\begin{align}J&=-4\int_0^1\frac{\ln t}{1+t^2}\d t\\&=-4\sum_{n\ge0}(-1)^n\int_0^1\ln t\cdot t^{2n}\d t\\&=4\sum_{n\ge0}(-1)^n\int_0^\infty t\cdot e^{-(2n+1)t}\d t\\&=4\sum_{n\ge0}\frac{(-1)^n}{(2n+1)^2}\int_0^\infty t\cdot e^{-t}\d t\\&=4C\end{align}$$
You made some typos in the last few expressions, but assuming your working is correct then you have arrived at: $$\int_0^{\pi/2}x\csc x\d x=-2i\left(iC+\frac{\pi}{2}C+\sum_{n\ge0}\left((-1)^n\cdot\frac{\pi n}{(2n+1)^2}-\frac{1}{(2n+1)^2}\right)\right)$$
To show that this equals $2C$, you need only show that: $$\sum_{n\ge0}\left(\frac{1}{(2n+1)^2}-(-1)^n\cdot\frac{\pi n}{(2n+1)^2}\right)=\frac{\pi}{2}C$$Or that: $$\sum_{n\ge0}(-1)^n\cdot\frac{n}{(2n+1)^2}=\frac{\pi}{8}-\frac{1}{2}C$$Using the known value of $\zeta(2)$ (for an explicit evaluation of $\sum_{n\ge0}(2n+1)^{-2}$, see e.g. here, though this is an easy corollary of the evaluation of $\zeta(2)$).
We can rewrite the summand as: $$\frac{1}{2}\cdot(-1)^n\cdot\frac{2n+1-1}{(2n+1)^2}=\frac{1}{2}\cdot\left(\frac{(-1)^n}{2n+1}-\frac{(-1)^n}{(2n+1)^2}\right)$$And now the claim is clear using this known value.