Development of Hilbert transform relationship
Your second try was already close. However, you treated the integral as if its limits were $-\infty$ and $\infty$. With the given integration limits there is only one delta impulse in the integration interval, i.e. only one index of the sum is relevant, all others are outside the integration interval. So if for some given value $\omega$ this index is $k=l$, then the result is

$$\int_{-\pi}^{\pi}X_R\left(e^{j\theta}\right)
\sum_{k=-\infty}^{\infty}\delta(\omega-\theta-2\pi{}k)d\theta=X_R(e^{j(\omega-2\pi l)})=X_R(e^{j\omega}\cdot e^{-j2\pi l})=X_R(e^{j\omega})$$