When he starts to get defiant, spell out the consequences for him and let him know that it's his choice if he wants those consequences or if he wants to find another way to do things. Then show him how he could do things differently. You will need to teach him how to better communicate his needs to you. In doing this, you will have to start by giving him specific examples of words he can use to express himself until he gets the idea and can do it on his own. Ask him why he doesn't want to do things and make him think about it and tell you. (he may not be able to do this at first so you will have to help him learn how to figure it out).
When he talks negatively about himself, ask him if someone has been saying this to him? If not, then explain to him that we all make mistakes, and that it's ok to make mistakes because that's how we learn. He also needs to know up front what his consequences are for things and make it clear to him that the choice is his but make sure he has two options, not just the punishment option. Help him see that there are other ways to do things and to make himself known without getting angry or making a bad choice. It might also help to explain to him that we all have to do things that we don't like or want to do, even adults, it's just how life is and talk to him about ways to handle it better. If he responds to positive reinforcements, then this should work with him too. It may just be that he doesn't know how to express himself then gets mad at himself for making another bad decision again and you can help him by making him stop and think about it and showing him the options when it starts to happen, before it gets out of control and he gets into trouble. That way he will also see that you are firm in how you deal with things...when you say that this will happen and it does, then he will know that he can trust you too. Not that he doesn't, but there are different levels of trust and he will eventually figure out that if he does this, then that will happen every time....both for the consequences and for the good choices. Good luck to ya hun!