How do we prove that $\int_0^1 \ln x\left({1\over \ln{x}}+{1\over 1-x}\right)^2\,dx=\gamma-1?$ How do we prove that:

$$\int_{0}^{1}\ln{x}\left({1\over \ln{x}}+{1\over 1-x}\right)^2\, dx =\color{blue}{\gamma-1}?\tag1$$

The only idea came to mind was this series
$$\sum_{n=1}^{\infty}{1\over 2^k(1+x^{-1/2^k})}={x\over 1-x}-{1\over \ln{x}}\tag2$$
Or expanded $(1)$
$$\int_0^1 \left({1\over \ln x} + {2 \over 1-x}+{\ln x \over (1-x)^2} \right)\,dx=\gamma-1\tag3$$
$$\int_0^1 {\ln x \over (1-x)^2}\,dx=\sum_{n=0}^\infty (1+n)\int_0^1 x^n\ln x \,dx = \sum_{n=0}^\infty (1+n)\cdot{-1\over (1+n)^2}\tag4$$
But $(4)$ diverges!
$\int {1\over 1-x} \, dx=-\ln(1-x)$
$\int_0^1 {2\over 1-x} \, dx$ also diverges
$\int{1\over \ln x} dx = \ln(\ln x )+\ln x +{\ln^2 x\over 2\cdot2!}+{\ln^3 x \over 3\cdot 3!}+\cdots$
$\int_0^1 {1\over \ln x} \, dx$ diverges too.
How do we go about integrating $(1)$?
Help needed, thanks!
 A: $\newcommand{\angles}[1]{\left\langle\,{#1}\,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\Li}[1]{\,\mathrm{Li}}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$

The Question:$\ds{\quad\int_{0}^{1}\ln\pars{x}
\bracks{{1 \over \ln\pars{x}} + {1\over 1-x}}^{2}\,\dd x =
\color{blue}{\gamma - 1}\,?}$.

\begin{align}
&\color{#f00}{\int_{0}^{1}\ln\pars{x}
\bracks{{1 \over \ln\pars{x}} + {1\over 1-x}}^{2}\,\dd x} =
\int_{0}^{1}\bracks{{1 \over \ln\pars{x}} + {2 \over 1 - x} + {\ln\pars{x} \over \pars{1 - x}^{2}}}\,\dd x
\end{align}
When $\ds{x \lesssim 1}$, both $\ds{1 \over \ln\pars{x}}$ and
$\ds{\ln\pars{x} \over \pars{1 - x}^{2}}$ are $\ds{\sim\,-\,{1 \over 1 - x}}$ such that the splitting of the original integral in three 'pieces' leads to divergent integrals albeit the sum of them converges. The above mentioned behaviour, when $\ds{x\lesssim 1}$, sugests the following splitting:
\begin{align}
&\color{#f00}{\int_{0}^{1}\ln\pars{x}
\bracks{{1 \over \ln\pars{x}} + {1\over 1-x}}^{2}\,\dd x}
\\[3mm] = &\
\underbrace{\int_{0}^{1}\bracks{{1 \over \ln\pars{x}} + {1 \over 1 - x}}\,\dd x}
_{\ds{J_{1}}}\ +\
\underbrace{\int_{0}^{1}\bracks{{1 \over 1 - x} +
{\ln\pars{x} \over \pars{1 - x}^{2} }}\,\dd x}_{\ds{J_{2}}}\ =\
J_{1} + J_{2}\tag{1}
\end{align}



*

*$\ds{\large J_{1} =\, ?}$. 
\begin{align}
&\int_{0}^{1}\bracks{{1 \over \ln\pars{x}} + {1 \over 1 - x}}\,\dd x =
\int_{0}^{1}\int_{0}^{\infty}\bracks{-x^{y} + \expo{-\pars{1 - x}y}}
\,\dd y\,\dd x
\\[3mm] = &\
\int_{0}^{\infty}\int_{0}^{1}\bracks{-x^{y} + \expo{-\pars{1 - x}y}}
\,\dd x\,\dd y =
\int_{0}^{\infty}\bracks{-\,{1 \over y + 1} +
\expo{-y}\,{\expo{y} - 1 \over y}}\,\dd y
\\[3mm] = &\
\lim_{\epsilon \to 0^{+}}\int_{\epsilon}^{\infty}\bracks{%
-\,{1 \over y + 1} + {1 \over y} - {\expo{-y} \over y}}\,\dd y
\\[3mm] = &\
\lim_{\epsilon \to 0^{+}}\bracks{-\ln\pars{\epsilon \over 1 + \epsilon} +
\ln\pars{\epsilon}\expo{-\epsilon} -
\int_{\epsilon}^{\infty}\ln\pars{y}\expo{-y}\,\dd y} =
-\,\lim_{\epsilon \to 0}\partiald{}{\epsilon}
\int_{0}^{\infty}y^{\epsilon}\expo{-y}\,\dd y
\\[3mm] = &\
-\Gamma\,'\pars{1} = -\Gamma\pars{1}\Psi\pars{1}
\end{align}
\begin{equation}\fbox{$\ds{\
J_{1} = \int_{0}^{1}\bracks{{1 \over \ln\pars{x}} + {1 \over 1 - x}}\,\dd x =
\color{#f00}{\gamma}\ }$}\tag{2}
\end{equation} 

*$\ds{\large J_{2} =\, ?}$.
Note that
\begin{align}
\int{\ln\pars{x} \over \pars{1 - x}^{2}}\,\dd x & =
\int\ln\pars{x}\,\dd\pars{1 \over 1 - x} =
{\ln\pars{x} \over 1 - x} - \int{1 \over 1  - x}\,{1 \over x}\,\dd x
\\[3mm] & =
{\ln\pars{x} \over 1 - x} - \int\pars{{1 \over 1  - x} + {1 \over x}}\,\dd x
\\[3mm] \mbox{such that}\quad &
\int\bracks{{1 \over 1 - x} +
{\ln\pars{x} \over \pars{1 - x}^{2} }}\,\dd x =
{\ln\pars{x} \over 1 - x} - \ln\pars{x}
\\[3mm] \mbox{and}\quad &
\left\lbrace\begin{array}{rcl}
\ds{\lim_{x \to 1}\bracks{{\ln\pars{x} \over 1 - x} - \ln\pars{x}}} & \ds{=} &
\ds{\color{#f00}{-1}}
\\[2mm]
\ds{\lim_{x \to 0^{+}}\bracks{{\ln\pars{x} \over 1 - x} - \ln\pars{x}}} & \ds{=} &
\ds{\color{#f00}{0}}
\end{array}\right. 
\\[3mm] \imp\quad & 
\fbox{$\ds{\ 
J_{2} = \int_{0}^{1}\bracks{{1 \over 1 - x} +
{\ln\pars{x} \over \pars{1 - x}^{2} }}\,\dd x =
\color{#f00}{-1} - \color{#f00}{0} = \color{#f00}{-1}\
}$}\tag{3}
\end{align}




With $\pars{1}$, $\pars{2}$ and $\pars{3}$:
$$
\color{#f00}{\int_{0}^{1}\ln\pars{x}
\bracks{{1 \over \ln\pars{x}} + {1\over 1-x}}^{2}\,\dd x} =
J_{1} + J_{2} =
\color{#f00}{\gamma - 1}
$$
A: Observe that $$ \int_{0}^{1}\left(\frac{1}{1-x}+\frac{\log\left(x\right)}{\left(1-x\right)^{2}}\right)dx\stackrel{x\rightarrow1-x}{=}\int_{0}^{1}\left(\frac{1}{x}+\frac{\log\left(1-x\right)}{x^{2}}\right)dx.$$ Fix $0<a<1$. We have $$I(a)=\int_{a}^{1}\left(\frac{1}{x}+\frac{\log\left(1-x\right)}{x^{2}}\right)dx
 $$ $$=\frac{-a\log\left(a\right)-\left(a-1\right)\log\left(1-a\right)+a\log\left(a\right)}{a}=-\frac{\left(a-1\right)\log\left(1-a\right)}{a}\underset{a\rightarrow0^{+}}{\rightarrow}-1.$$ The identity $$\int_{0}^{1}\left(\frac{1}{\log\left(x\right)}+\frac{1}{1-x}\right)dx=\gamma$$ is classical. See for example here.
A: A simple but very effective suggestion: always try to work with convergent series/integrals when possible.
We are interested in:
$$ \int_{0}^{1}\left(\frac{1}{\log x}+\frac{2}{1-x}+\frac{\log x}{(1-x)^2}\right)\,dx=\gamma+\int_{0}^{1}\left(\frac{1}{1-x}+\frac{\log x}{(1-x)^2}\right)\,dx $$
and we may notice that:
$$\begin{eqnarray*} \int_{0}^{1}\left(\frac{1}{1-x}+\frac{\log x}{(1-x)^2}\right)\,dx &=& \int_{0}^{1}\frac{x+\log(1-x)}{x^2}\,dx\\&=&-\int_{0}^{1}\sum_{k\geq 2}\frac{x^{k-2}}{k}\,dx\\&=&-\sum_{k\geq 2}\frac{1}{k(k-1)} \\&=&-\sum_{k\geq 1}\left(\frac{1}{k}-\frac{1}{k+1}\right)=\color{blue}{-1}.\end{eqnarray*}$$
We have to be extra-careful in dealing with slow-convergent series: otherwise, the risk is to prove $0=1$ or something like that.
