I really like playing D&D. There's something about the environment that I find to be amazing for making friends; everyone has their emotional defense barriers slightly lowered, and there are a lot of fun things to talk about that come up in the course of the game.
However, my problem is that for a great deal of time I've played, I was emotionally kinda broken. A lot of things in my life weren't going too well, and I ended up retreating into my character.
Since that time, I've been able to take concrete steps to fix my life, and things are looking up. I now am fully aware my previous approach to the game wasn't emotionally healthy, and I want to fix that for the future, but I don't specifically know how. (What I consider to be unhealthy: betrayals and my character's mistakes in-game would seriously shake me on a personal, out-of-game level.)
How can I go about emotionally distancing myself from my future characters? I don't want to get that trapped by emotional transference again, though I also don't exactly want to be roleplaying Marvin the robot from Hitchiker's Guide (I do enjoy taking an active role in solving problems). I would really appreciate any advice, especially if anyone has a personal experience with a similar situation.
If it makes a difference, I'm not going to be playing for a while because I'm still getting my life back together, but I would like to start again sometime soon, perhaps after the new year.