  To mimic protoplanetary discs (PPDs) evolution, 2D simulations with
self-gravity must introduce a softening prescription of the gravitational
potential. When the disc is only made of gas the smoothing length is
proportional to the gas scale height. On the other hand when a dust component
is included, the question arises as whether the smoothing length approach can
still be used to quantify not only the dust self-gravity but also its
gravitational interaction with gas.
  We identified grey areas in the standard smoothing length formalism for
computing self-gravity in PPDs uniquely made of gas. We revisit the smoothing
length approach which is then generalised to two phases when the dust component
can be considered as a pressureless fluid.
  Analytical developments are used to approximate the vertically averaged
self-gravity when the smoothing length is not assumed to be constant but rather
a spatial function.
  We obtained an analytical expression for the space varying smoothing length,
which strongly improves the accuracy of the self-gravity computation. For the
first time, this method is generalised to address bi-fluid interactions in a
PPD: two additional smoothing lengths are proposed for featuring an isolated
dusty disc and gas-dust self-gravity interactions. We checked that our method
remains compatible with standard fast Fourier transform algorithms and
evaluated computational costs.
  Our space varying smoothing length permits (i) to solve the contradictions
inherent to a constant smoothing length hypothesis, (ii) to fit accurately the
3D vertically averaged self-gravity and (iii) is applicable to a bi-fluid
description of PPDs with the use of two additional smoothing lengths. Such
results are crucial to enable realistic 2D numerical simulations accounting for
self-gravity and are important to deepen our understanding of planetesimals
formation and type I migration.
