You should first apologize sincerely for your mistakes and tell her that you agree with her decision. Then give her some space and time to cool down and (hopefully) start to miss you and the good times you had together.
Then you have to ask yourself what you need to work on changing so that if you do get back together things will be better.
She will want to see that you are making an effort.
It's also important for you to spend some time getting out and having fun with friends. Don't sit home and mope -or worse yet constantly call or text her. You don't want to come across as needy. You want to show her the person you were when you first met her and started going out - maybe even better than before!