That is hard.
1. Establish boundaries. Calmly let her know that she can tell you what is upsetting her, but not be verbally abusive. Give a concrete example: "It is okay to say, 'I have no friends at school,' or 'It seems like you like my sister more than me,' but it is not okay to say, 'I hate you.' If you say that, you will... (We use "Go to your room and come out when you are ready to speak kindly. I want to hear what you have to say." Then they are learning self control - really wait until they come out. Don't go to the door and cajole. But don't have a tv or computer or game in there so that it unnecessarily prolongs the session.)
2. Think about her influences. Is she watching tv/movies/reading books where kids say those things? Brats are not allowed in our house - I have enough to train my girls in being civil and kind without outside influences.
3. Sounds like she really wants some more time with you. Does she pick up on how easy it is for you and your younger one to interact? I love both my girls, but my youngest is so cuddly, it really is a joy to cuddle with her. I have to consciously make time to cuddle with my elder because she feels the difference. Don't make it a reward for her bad behavior. Independently, set up a time to go out with her for cocoa - just an hour - it doesn't have to be an elaborate affair - remember we girls like small, consistent acts of love.
4. The Wonder of Girls by Michael Gurian has been a wonderful book to read. I am reading it with my 9 year old at her request. I'd suggest you read it.