I never said she HATED her life, but she falls into the depression over existence, or lack there of it, trap.
And uh...she totally forced/tricked Roxas into fighting her so he could defeat her so she would be part of Sora again, because she knew he wouldn't do it if she simply asked him to.
It wasn't that she went against her friends, because she never even stood BY them or even TRIED to get their help. You cannot 'go against' someone if you were never with them to start. The very moment she found out what she was she turned on them, without even an explanation. Roxas was in the dark about everything until the VERY end of the game.
There was plenty of opportunity for Xion to find a better solution to the problem; but she didn't and that was of her own free choice. Over all in the story she made things so much more complicated for Roxas and Axel. Between Xion, Roxas, Axel, and Riku there could have been a much easier, simplier, less traumatic way for the situation to be resolved. Her lack of communication, trust, foresight, and problem solving skills, however; led to the game we got.
I cannot fault her for it, however; because many other KH characters have done the same exact thing. Her's is just. as hatok said it best: