We can rewrite the expression under $\lim$ as terms that each are convergent as $\epsilon\to 0$:
$$
\int_{\epsilon}^{\frac{\pi}{2}}\frac{\phi(x)}{\sin x} dx + \phi(0)\ln\epsilon
= \int_{\epsilon}^{\frac{\pi}{2}} \left( \frac{1}{\sin x} - \frac{1}{x} \right) \phi(x) \, dx + \int_{\epsilon}^{\frac{\pi}{2}} \frac{1}{x} \phi(x) \, dx + \phi(0)\ln\epsilon \\
= \int_{\epsilon}^{\frac{\pi}{2}} \left( \frac{1}{\sin x} - \frac{1}{x} \right) \phi(x) \, dx + \ln\frac{\pi}{2} \, \phi(\frac{\pi}{2}) - \ln\epsilon\,\phi(\epsilon) - \int_{\epsilon}^{\frac{\pi}{2}} \ln(x) \, \phi'(x) \, dx + \phi(0)\ln\epsilon \\
= \int_{\epsilon}^{\frac{\pi}{2}} \left( \frac{1}{\sin x} - \frac{1}{x} \right) \phi(x) \, dx + \ln\frac{\pi}{2} \, \phi(\frac{\pi}{2}) - \frac{\phi(\epsilon)-\phi(0)}{\epsilon}\epsilon\ln\epsilon\,\phi(\epsilon) - \int_{\epsilon}^{\frac{\pi}{2}} \ln(x) \, \phi'(x) \, dx \\
\to \int_{0}^{\frac{\pi}{2}} \left( \frac{1}{\sin x} - \frac{1}{x} \right) \phi(x) \, dx + \ln\frac{\pi}{2} \, \phi(\frac{\pi}{2}) - \int_{0}^{\frac{\pi}{2}} \ln(x) \, \phi'(x) \, dx
$$
The first term is convergent since
$$
\frac{1}{\sin x} - \frac{1}{x}
= \frac{x-\sin x}{x\sin x}
= \frac{x-(x+O(x^3))}{x(x+O(x^3))}
= \frac{O(x^3)}{x^2+O(x^4)}
= O(x)
.
$$
The second term, $\ln\frac{\pi}{2} \, \phi(\frac{\pi}{2})$, is constant and therefore trivially convergent.
The third term, $\frac{\phi(\epsilon)-\phi(0)}{\epsilon}\epsilon\ln\epsilon\,\phi(\epsilon)$, vanishes as $\epsilon\to 0$ since
$$
\frac{\phi(\epsilon)-\phi(0)}{\epsilon}\epsilon\ln\epsilon\,\phi(\epsilon)
\to \phi'(0) \cdot 0 \cdot \phi(0) = 0.
$$
The last term, $\int_{\epsilon}^{\frac{\pi}{2}} \ln(x) \, \phi'(x) \, dx$, is convergent since $\ln \in L^1_{\text{loc}}(\mathbb{R}^+).$
We conclude that the given expression defines the distribution
$$
\left( \frac{1}{\sin x} - \frac{1}{x} \right) \chi_{[0,\frac{\pi}{2}]} + \ln\frac{\pi}{2} \, \delta_{\frac{\pi}{2}}(x) + \left(\ln(x) \chi_{[0,\frac{\pi}{2}]}(x)\right)'
.
$$