Steve Maraboli wrote this line in his book "Life, the Truth, and Being Free":
“Happiness is not the absence of problems, it's the ability to deal with them.”
Many people use writing as a sort of escape from their problems. For the short amount of time that they are writing, they are able to stop thinking about whatever it is that bothers them. It's like watching TV or reading a book--it takes your mind off the problem.
But I like to think that writing helps me to confront my problems rather than escape them!
We all have weaknesses in our lives, and I know that my problems and weaknesses tend to be pretty discouraging. I find myself struggling with the same problem day in and day out, and things never seem to get any better.
So it should come as no surprise to find that the character I am writing is dealing with the same recurring problems. Perhaps the issues of a half-demon assassin are very different than the issues a step-parent of four pre-adolescent children, but that doesn't mean his problems are any less all-pervasive than mine. In fact, the stubborn refusal of our problems to go away is kind of what bonds me to this character so much!
Writing has helped me to deal with my problems, in a way that may seem completely odd and unusual to some people. I try to help the character find a solution to his problem (being trapped in a maze of death, trying to break free of a torture chamber, and so on), and in doing so, I often end up coming with a solution to my own problems. The creative, oblique thinking I need to use for my character's story helps me to apply that same way of thinking to my own life.
Don't use your writing as an escape from your problems! Let it help you face and deal with your problems, and it will make you as happy as it has made me.