Hi, I'd like to help you with your question.
I am impressed with your ability to have insight into the problem you had. The fact that you acted the way you did, realized it and owned up to it shows strength.
The fact that this just happened two weeks ago may be a bit early for your girlfriend to be able to start feeling happy again about the relationship. In order for her to break up with you, she must have been pretty hurt by whatever happened. It is not easy for her to change her feelings that quickly. She needs time.
Back off a little. Let her have space, but also let her know you love her. Do nice things quietly and don't call attention to them. Do them out of love but not to gain her favor. Be there. That is one of the nicest things you can do to help. Talk with her whenever she wants and keep it neutral, no pressure. Just be yourself around her. The last thing she probably wants is for you to try to impress her. She is sorting out her feelings and the more pressure she gets, the more she'll react with hostility.
If this goes on for months, consider counseling. Couples counseling can be very effective in helping you both learn to air out your problems and feelings and also to learn to communicate so neither of you get hurt in the process. Contact your local community mental health center or if you attend church, your pastor is a wonderful source for couples in need of counseling.
There is also a wonderful website to help you learn the best way to give her the love she needs. It is called http://www.5lovelanguages.com/. It helps you learn more about how to love each other the best way possible.
I hope this has helped you,