Its hard not to get upset & yell when they're not listening/behaving - and they'll always misbehave most around the person they're most at ease with. Maybe you need a break from each other for a bit - weekend or night at the grandparents - special time for her & you can have some alone time (and not to be cleaning the house....have 'me' time).
Helping with homework - ask the teacher for some tips, if she's getting frustrated & you're getting frustrated with the homework - maybe take a step back, so some 'easy' stuff to boost her confidence, make sure she knows the preliminary work, has a good foundation to be learning the new skills. My son would get so frustrated he'd be in tears & toss the book/papers - its difficult.The other thing that has worked for my kids - to boost confidence is enrolling them in team sports, swimming lessons - where they can 'push' themselves & see the results of their efforts.
My girl is 5.5 and the attitude is large, and so emotional - I wonder if its their hormones
? Mine will scream she hates me, break out in tears, then come back a few minutes later all sweet - drives me crazy! She's better when she's active, so I keep her busy outside or doing something physical.