Sword Health, a startup focused on helping people deal with pain through digital services, is expanding into mental health and has raised additional capital to fuel its growth.

The 10-year-old company is introducing Mind, which uses a combination of artificial intelligence, hardware and human mental health professionals to treat patients with mild depression and anxiety. Sword said Mind will help users access care whenever they need it, rather than during sporadic, hourlong appointments.

“It’s really a breakthrough in terms of how we address mental health, and this is only possible because we have AI,” Sword CEO Virgílio Bento told CNBC in an interview.

Also on Tuesday, Sword announced a $40 million funding round, led by General Catalyst, in a deal that values the company at $4 billion. The fresh cash will support Sword’s efforts to grow through acquisitions, as well as its global expansion and AI model development, the company said.

The round included participation from Khosla Ventures, Comcast