Millions already lean on chatbots for emotional support. With careful development, they could deliver a new generation of mental healthcare.