Supposed I defined:
$Px$ = $x$ is a person
$Lxy$ = $x$ loves $y$
And I expressed that everyone loves someone:
$$(∀x)(Px \implies (∃y)(Py ∧ Lxy))$$
However I want to formally exclude narcissists who love themselves eg. "everyone loves someone who is not themselves". A trivial way is to define:
$Sxy$ = $x$ is the same way as $y$ (... specifying the truth values as the diagonal of the table...)
Then state:
$$(∀x)(Px \implies (∃y)(Py ∧ \neg Sxy ∧ Lxy))$$
I'm wondering if there is a better way than this to identify shared identity between quantified variables in inner expressions?
In first order logic, equality is typically used to denote equality of objects, where equivalence of formulas is typically denoted by two way arrows ($\leftrightarrow$). This is to clarify an apparent misconception in the comments.
So, as was stated in the comments, you could use first order logic with equality. You, however, do not need equality to denote that two objects are the same, at least in the sense that they have identical behaviour. Doing this is different for any given signature, so I will express that $x=y$ in the signature you give. I am using the signature you give without $S$, as it is not necesary to introduce new nonlogical symbols.
$x=y:\;\;\; (z)( (Px\leftrightarrow Py) \wedge (Lxz\leftrightarrow Lyz) \wedge (Lzx\leftrightarrow Lzy) )$
So, you basically just assert that $x$ and $y$ relate to all other elements and to themselves in the exact same way. Thus $x$ and $y$ behave the same, and this has the same consequences as using first order logic with equality, but without adding equality to your list of nonlogical symbols.