I read some of the posts here and I see where people are coming from but I have some things I'd like to share and it's worth looking into.
First, I don't know if there is some hurt or anger going on inside of her that is causing her to hurt herself. Who are her friends? What kind of kids does she hang out with and etc? Also, is there any change in the family or neighborhood? Change in family like separation or moved from where she had most of her friends and now they are farther away?
Second, if none of those things, she may need to be corrected and put back in her place. First of all, my boys don't dare raise their voice at me, or say those phrases or get in my face. I still believe in spankings but only when it's called for. When she says, "What are you going to do if I don't do it?" then you need to have a consequence for the actions. I have a consequence for getting in my face or for saying certain phrases and I have a consequence for not doing what they are told. How about sitting down with her and talk to her that you don't appreciate her talking the way she has been and if there is anything she wants to share, you need to listen to her and see what she is saying and feeling. You want to establish that kind of relationship with her and let her know how she feels and thinks will be heard and she can express it. I will pray for you, S. and your daughter and let us know how it went and what is going on.