One can in principle consider a Schwarzschild spacetime:
$ds^2 = -\left(1- \frac{2M}{r}\right)dt^2 + \frac{dr^2}{1- \frac{2M}{r}} + r^2 \left(d\theta^2 + \sin^2 \theta d \phi^2\right)$
The Lagrangian of geodesics is then given by:
$\mathcal{L} = \frac{1}{2} \left[- \left(1 - \frac{2M}{r}\right)\dot{t}^2 + \frac{\dot{r}^2}{1-\frac{2M}{r}} + r^2 \dot{\theta}^2 + r^2 \sin^2 \theta \dot{\phi}^2\right]$
After applying the Euler-Lagrange equations, and exploiting the fact that the S-metric is spherically symmetric and static, one obtains the orbital equation for light as (After defining $u = 1/r$) as:
$\frac{d^2 u}{d\phi^2} + u = 3 M u^2$.
It 's pretty difficult to solve this ODE. In fact, I don't think a closed-form solution exists. One can apply a perturbation approach. Defining an impact parameter $b$, one can obtain an ansatz solution to this ODE as:
$u = \frac{1}{b} \left[\cos \phi + \frac{M}{b} \left(1 + \sin^2 \phi\right)\right]$.
One can derive the following relationship:
$u\left(\frac{\pi}{2} + \frac{\delta \phi}{2}\right) = 0$,
where $\delta \phi$ is the deflection angle.
Now, finally Taylor expanding $u$ above around $\pi/2$, one can show that, in fact:
$\delta \phi = \frac{4M}{b}$,
which is the required result.