I've come across a series of identities existing between dilogarithms and powers of logarithms but I am not sure about when such equations are valid in terms of the restriction of the domain of the argument.
For example, here http://functions.wolfram.com/ZetaFunctionsandPolylogarithms/PolyLog2/17/01/01/ one come across the identity $$\text{Li}_2(z) = -\text{Li}_2 \left(\frac{1}{z}\right) - \frac{1}{2}\text{Log}^2(-z)-\pi^2/6$$ which comes with the validity condition $z \notin (0,1)$ Indeed, if I try for some values of $z$ in this range I see that the left hand side is real and the right hand side contains an imaginary part, for example.
My thinking was that the correction to the right hand side to account for $z\in (0,1)$ was to use the formula immediately below this one (it does not come with a domain of validity): $$\text{Li}_2(z) = -\text{Li}_2 \left(\frac{1}{z}\right) - \frac{1}{2}\text{Log}^2(-z)-\pi^2/6 -\mathrm{i}\pi \left(\sqrt{\frac{z-1}{z}} \sqrt{\frac{z}{z-1}} - 1 \right)\text{Log}(z),$$ however I have tried to check this equation with $z \in (0,1)$ numerically in mathematica and I see that it still does not work.
So when are these identities valid?