D.B.
A 13 year old is not a little girl. Her ex-boyfriend is harassing her. I would let his parents know right away, and tell them you are blocking his number but I would print out the texts and mail them to the parents. Be aware that there could be messages back to him from your daughter that they may choose to share with you. Take the approach with them that both kids were involved in something they should not have been, and you would want to know about your daughter (look how you feel knowing she hid it from you) and so you are informing them as responsible parents. Do not blame him. Also find out a work address where you can mail the info so he doesn't intercept the mail, especially if they tell him it's coming. Don't call the "little boy" (and he's not - he's a teenager!) yourself - let his parents handle it.
Take away her electronics. All teens do the "I hate you, you love my brother more" routine. If she's not really sad and depressed all the time, it's usually just anger and trying to get under your skin to make you give in.
Tell her that a cell phone and an iPad are privileges for teens with good attitudes and for those who earn it by taking on some responsibility. If she cannot clean her room and set the table (or whatever the chores are), then she will not get her phone back. She can earn it back by showing she is mature and responsible. A phone is a PRIVILEGE, not a right.
Put up a calendar and mark on it when she gets her phone back. Maybe a week or 2. List the chores to be done. Every day she does them, the schedule stays as is. If she does MORE than you ask, 1 day comes off the end of the phone ban. If she argues, whines, curses, or is disrespectful, 1 day gets added to the end, lengthening the amount of time before she can get it back. If you want to, you can allow her to negotiate but only if done in a respectful tone: "Mom would you consider allowing me to do the dishes and vacuum the living room instead of cleaning the bathroom?" That's respectful and you can agree to it or not. "Mom, you're so unfair, I hate you, why me?" is not acceptable.
If you don't show her who's boss now, you will never be able to trust her or control her when she is 15 or 16. She's already showing you that she can lie and hide things from you, can use bad language, etc. She's also gotten herself into a situation she can't get out of by herself. Remind her that you are her mother and she can come to you with problems. But you must stop seeing her and her friends as "little kids" because they are not. This is the age when they start to drink, smoke, have sex, and do all kinds of other dangerous activities. Teach her now that her actions have consequences, and that she can CHOOSE to have privileges and a great time as long as she does it with maturing and good decision-making.