Understanding the behavior of fermion-antifermion ($$f\overline{f}$$
f
f
¯
) pairs is crucial in modern physics. These systems, governed by fundamental forces, exhibit complex interactions essential for particle physics, high-energy physics, nuclear physics, and solid-state physics. This study introduces a novel theoretical model using the many-body Dirac equation for $$f\overline{f}$$
f
f
¯
pairs with an effective position-dependent mass (i.e., $$m \rightarrow m + \mathcal {S}(r)$$
m
→
m
+
S
(
r
)
) under the influence of an external magnetic field. To validate our model, we show that by modifying the mass with a Coulomb-like potential, $$m(r) = m - \alpha /r$$
m
(
r
)
=
m
-
α
/
r
, where $$-\alpha /r$$
-
α
/
r
is the Lorentz scalar potential $$\mathcal {S}(r)$$
S
(
r
)
, our results match the well-established energy eigenvalues for $$f\overline{f}$$
f
f
¯
pairs interacting through the Coulomb potential, without approximation. By applying adjustments based on the Cornell potential (i.e., $$\mathcal {S}(r) = kr - \alpha /r$$
S
(
r
)
=
k
r
-
α
/
r
), we derive a closed-form energy expression. We believe this unique model offers significant insights into the dynamics of $$f\overline{f}$$
f
f
¯
pairs under various interaction potentials, with potential applications in particle physics. Additionally, it could be extended to various $$f\overline{f}$$
f
f
¯
systems, such as positronium, relativistic Landau levels for neutral mesons, excitons in monolayer transition metal dichalcogenides, and Weyl pairs in monolayer graphene sheets.