Assume we are given some function $f(z)$, which is analytic everywhere except for a branch cut along the positive real axis. I would like to know how to analytically continue this into the lower half plane. From what I've read, this is (in principle) somewhat straightforward. The analytical continuation of $f(z)$, denoted $f_\downarrow(z)$ is given by
\begin{equation} f_\downarrow(z) = \begin{cases} f(z) & \mathrm{Im}(z)>0,\\ f(z) + \rho(z) &\mathrm{Im}(z)<0, \end{cases} \end{equation},
where I define $\rho(z)$ as the analytical continuation of the function $\rho(x) = f(x+i\delta) - f(x-i\delta)$, which gives the discontinuity of $f(z)$ across the real axis. However, though I can calculate $\rho(x)$ for a given function, I don't know how to analytically construct $\rho(z)$ from $\rho(x)$.
Examples: If I take $f(z) = \sqrt{z-1}$, which has a branch cut for $z<1$ (taking the branch cut of $\sqrt{z}$ to be along the negative real axis), then we have $f(x\pm i \delta) = \pm i \sqrt{1-x}.$ This then gives $\rho(x) = 2i\sqrt{1-x}$. How do I take this $\rho(x)$ and find $\rho(z)$?
For this specific $f(z)$, it is simple enough to guess $f_\downarrow(z) = -\sqrt{z-1}$, since the minus sign will cancel the minus sign appearing in the square root for $\mathrm{Im}(z)<0$. In particular, $f_\downarrow(z)$ is continuous as one crosses the real line, and has the values $f_\downarrow(x>1) = \sqrt{x-1}$ and $f_\downarrow(x<1) =i\sqrt{1-x}$. Note: see edit below!
However, I would like to be able to do this procedure in general.
Another example I have come across is $\arcsin(z)$, which has a branch cut for $\mathrm{Re}(z)>1$. Apparently, its analytic continuation across the cut is $\pi - \arcsin(z)$. I cannot obtain this result, although I can derive (I think) $\rho(x) = -i\ln(\frac{x-\sqrt{x^2-1}}{x+\sqrt{x^2-1}})$ for this function.
In particular, I am currently concerned with analytically continuing the complete elliptic integrals $E(z)$ and $K(z)$, and $\arcsin(z)$, across the $\mathrm{Re}(z)>1$ branch cut.
Thank you so much for your help!
Edit: In my example with the square root, $f_\downarrow(z)$ is now continuous in the interval $(-\infty,1)$, but there is now a branch cut for $z>1$. This is totally fine with me. My hopefully better-posed question is, "Given some interval on the real axis, say $(a,b)$, I would like to construct a function $f_\downarrow(z)$ which is (i) equal to $f(z)$ in the upper half plane, and (ii), continuous as one crosses the interval $(a,b)$ into the lower half plane.