Many people with mental or emotional issues use creative writing to ‘write out’ their problems.
The structure required to put together a creative work forces them to put structure to what they experience. That structure helps them put the problem into some kind of order and, with order, they may finally be able to make sense of it as a whole and, hopefully, deal with it.
The effort of writing down what they’ve felt and experienced helps them view those experiences from a safe place and, again hopefully, helps them get past it.
Creative writing as therapy doesn’t only help people with mental illnesses. It helps everyone who writes. I’ve seen this often in writing groups to the extent that one such group laughingly called itself the ‘writers and support group’ because so much of the writing was therapeutic in nature and things long thought buried were brought out into the open and, as writers critiqued each other’s writing that was about long buried problems, they also in the process, gave emotional support to the writer.
It was in such groups that I came to realize that most writers — possibly all — go through what I think of as a ‘therapeutic’ phase in their writing. It’s the beginning phase and it consists of ‘writing out’ things that happened to them that they’d not dealt with. Some were minor, some major, but almost everyone alive has experienced things they are better off facing and dealing with.
Then, as problems were ‘written out’ and got past, those writers often went on to other things and frequently became quite good writers.