When my boy was your son's age, I remembered something my mother told me. "When your child is frustrating you the most, that is when he or she needs a hug the most." Amazingly, it worked. I learned to keep my voice calm, to add endearments in when I requested he do something ("Did you take your dishes to the sink, sweetie?"), and to remind him often that I love him. On subjects like math and writing, when he balked, I would remind him that he and I were working as a team. If tears ensued, I would say "let's take a walk outside and then come back and see how it goes." I learned that a child can't learn when she or he is crying.
Now that my child is finishing his fifth grade homeschool year, I notice a huge difference in his attitude. While he still hates math, he cooperates (sometimes with occasional whining, but I don't respond to the whining). We work as a team and this has helped immensely.