SEN. JULIAN CYR has struggled with anxiety and depression since childhood. As a boy who was gay, he was bullied in school, had panic attacks and developed an eating disorder.

Therapy helped him manage his anxiety. But Cyr still cannot get his health insurance to cover his outpatient mental health care.

“I’m a pretty savvy consumer,” Cyr said at a press conference on Thursday. “If I can’t figure out how to navigate through these barriers in accessing care through this broken system, imagine how many other people in Massachusetts can’t get the help they need.”

The Massachusetts Senate on Thursday, by a unanimous vote of 38-0, passed a bill aimed at addressing the major barriers people face to accessing mental health care: insurance coverage and provider availability.

The bill now goes to the House.

The bill was championed by Senate President Karen Spilka, whose father struggled with post-traumatic stress disorder after World War II. Supporters of the bill hailed it as a first step toward transforming a system that today leaves many people, often children, floundering without proper health care.

“Discrimination has for too long driven disparities in insurance coverage and health care access for children, adults, and their families,” said Danna Mauch, president and CEO of the Massachusetts Association for Mental Health, which advocates for people with mental health conditions.

Advocates have long bemoaned the problem of people who arrive at the emergency room with mental health issues being forced to wait there for days before a treatment bed becomes available. In 2015, according to a report by the Massachusetts Health Policy Commission, 50,000 people with behavioral health conditions in Massachusetts spent at least 12 hours waiting in an emergency room. The problem can be even more acute for children and teenagers.

Lengthy emergency room waits are just one symptom of a mental health system in which it is often difficult to obtain care, once someone is in crisis or before they get to that point. A 2019 survey by the Blue Cross Blue Shield of Massachusetts Foundation found that more than half of adults who sought care for mental health or substance use disorders reported difficulties getting that care, often because providers were not accepting new patients or would not accept the person’s insurance.

Rebecca Gewirtz, executive director of National Association of Social Workers’ Massachusetts chapter, said just in the last year, her organization has seen a 70 percent increase in calls to a free program that matches patients with a local social worker. “Some call in who are desperate, who have been trying for weeks or months to get the treatment and the help they so desperately need,” she said.

The Senate bill would mandate that insurers cover acute mental health treatment, when someone arrives at the hospital in crisis, without requiring prior authorization. Emergency departments would have to have a clinician available at all times to evaluate and stabilize someone with a mental health crisis. The bill also requires insurers to cover community-based services for individuals seeking help in a psychiatric emergency.

Although state law already requires that mental health care be covered by insurers similarly to physical health care, in practice that often does not happen. The Senate bill would create more oversight and potential penalties if an insurer does not comply with parity laws.

Insurers would no longer be allowed to deny coverage for a mental health care visit simply because it takes place on the same day and in the same facility as an appointment for physical health care.

Today, many mental health clinicians do not take any insurance, or do not take public insurance, because of the low reimbursement rates and administrative hassles. The bill includes several provisions aimed at encouraging more providers to accept insurance.

The bill would require insurers to set a minimum rate for mental health evaluation and management services that is consistent with the rate for comparable physical health services. It would also require insurers to use a standard credentialing form, so providers could submit the same form to every insurer. Insurers would be required to approve applications more quickly to include providers in their network.

The Senate Ways and Means Committee estimates that the bill will cost the state $5.7 million, mostly to fund pilot programs related to supporting psychiatric nurse practitioners in community health centers and implementing a tele-behavioral health program in schools. But Senate Ways and Means Chair Michael Rodrigues said, “The cost of action on this issue is far less than the cost of inaction, both financially and for the wellbeing of all residents of the commonwealth.”

The bill also aims to address the workforce shortage of mental health clinicians, by letting mental health counselors practice with interim licensure while their license is pending; creating a pilot program to offer support and training to psychiatric nurse practitioners who work in community health centers in underserved areas; and creating a pilot program to support individuals from diverse backgrounds who are training in mental health.

The bill has support from a wide range of health organizations, including those representing insurers, hospitals, social workers, behavioral health providers, community health centers and the Massachusetts Medical Society.

Lydia Conley, president and CEO of the Association for Behavioral Healthcare, said until now there has been unequal access to services throughout Massachusetts. “This bill is saying it’s now time for mental health care to be health care for everyone,” Conley said.

Steve Walsh, president and CEO of the Massachusetts Health and Hospital Association, said it is important that the bill address the workforce challenge “so when a patient presents at the ER, they can get a bed and they can get a person that can help.”

Senators introduced 82 amendments and spent several hours debating on the floor. Many amendments were withdrawn or rejected.

One amendment that was adopted, sponsored by Sen. Joan Lovely, aims to address the problem of long emergency room waits for children by requiring the state to develop protocols to ensure that anyone under age 22 who enters an emergency room requiring inpatient psychiatric treatment is evaluated within 12 hours and placed in a treatment facility within 48 hours.

One amendment by Senate Minority Leader Bruce Tarr that was adopted would create a new task force to look at pediatric mental health services and make recommendations to improve availability, access, and cost-effectiveness. Another amendment that was adopted, sponsored by Sen. Cynthia Creem, would look at developing new protocols to screen children for trauma.