Sometimes I say things that I know will upset my girlfriend.
What happens when you say these things to her?
I find myself getting more and more frustrated with her.
We can all get frustrated with our partner sometimes, but we shouldn't deliberately try to upset them. If you're with someone who frustrates you so much that you want to upset them, then the relationship is toxic and you should consider ending it.
Why'd you have to go and ruin it by giving me advice? I was trying to hurt her.
It is not good that you want to hurt your girlfriend by upsetting her. It is not a good way to deal with the relationship and it won't make you happy in the long run. You should try counseling to deal with your emotions better.