Since you ask for a formula involving quantification, this is how I'd write it and how you would probably see it written
in most any textbook on axiomatic set theory. As you can see, there's no need for explicit mention of the empty set.
The key here is to recognize that it's a hypothetical statement.
(Note: 'e' denotes set membership; the other symbols should be obvious).
(x)(y)(z) [[(xeA ^ yeA) ^ ~(x = y)] -> [zeA -> [(z = x) V (z = y)]]]