Consider the language that has propositional variables $p_{x,y}$ for any pair $x,y\in X$. It will effectively stand for $x
Now, our theory $T$ will be the combination of these three theories:
1. $\lnot p_{x,x}$ for all $x\in X$;
2. $p_{x,y}\lor p_{y,x}$ for all $x\
eq y$; and
3. $p_{x,y}\land p_{y,z}\rightarrow p_{x,z}$ for all $x,y,z\in X$.
Use compactness to prove that $T$ is satisfiable: for any finitely many propositions, only finitely many variables are involved, and we can linearly order the set of necessary $x$'s to find a satisfying assignment for the variables.
So by compactness there is an assignment $\sigma$ for which $T$ is evaluated as true. Now define $x