Somebody once told me that dealing with a 4 year old is like dealing with someone who is sort of brain damaged. I have to agree. Mine is almost 5 now, and I can say 4 was just not a good year. Sassy, smartmouthed, testing limits. They learn to talk back, they do NOT learn how to CHOOSE their battles. They are little power monging neandrethals.
I like the book, "How to behave so your preschooler will, too" and the "Time out Tot" dvd. Beyond that, sometimes just getting on their level and doing the opposite of what they expect (losing temper) and empathizing with them can throw them off guard. Otherwise, just make the rules, let her know what behavior you DO expect, let her know the consequences of her behavior, let her know it is HER choice, follow through without fail, and maybe try a sticker chart for good behavior. I'm sure you do all that, and this advice is not helpful, some of it is just being 4, and you just have to take breaks and get away from it so YOU don't go crazy, until she is closer to 5. Hang in there!