Can I use an analogue switch with separate circuits?
You need a common reference...

Your suspicion is correct, but you can fix it... just connect all the grounds together.

You may actually not need that complicated of a circuit. If you test the buttons in the controller(s), you will likely find that one side of the button-switch is already connected to ground. So all you have to do is short out the other side to ground and you are done. 

Make sure that you are not driving the button when you do not intend to "press" it as this will create electrical contention and damage your output circuit.

In summary...


Connect the three grounds.
Determine if the controller buttons are grounded.
Connect your analog switch (or microcontroller GPIO output through a big resistor) to the other side of the button. 
Ensure that you are switching from High-Z (GPIO in "input" mode) to Output Low (ground).