Quitting PostgreSQL from mac terminal
First of all, you can switch to another database without leaving psql at all, use \c (or \connect) commad.

From psql's help (always available via \? command):

Connection
  \c[onnect] {[DBNAME|- USER|- HOST|- PORT|-] | conninfo}


So just type \c another_db to switch to "another_db".

Next, you see "[Process completed]" because you start psql via some shortcut your Postgres package (brew? postgres.app?) provided. 

You can launch Terminal or iTerm2 (not default app in MacOS, but highly popular substitution for default Terminal), and then run psql inside it. In this case, you will not lose the window after \q command.