How can I forget her?

There are a number of things you can try to forget an ex-lover. The first thing to do is that you make a decision to learn from the experience and move on. Yes, it might hurt, and the more energy invested, the more the pain. But you can push through it, and such pain is human.

If you were given reasons for the breakup that had to do with you, then it would be wise to fix them, particularly if they include activities that harm yourself or others. Then you should do things to help you better yourself and to forget. Work out, do some hard work, start a pet project, build something, or whatever. Then decide you are going to live again, and find someone suitable for you if possible.

As for your ex, apologize to them if you hurt them. Let them know if you are open to them again, and let her know that she has the right to find what she believes is best for her. Then just get out of the way. If it was meant to be, she will likely come back, but if not, don't waste your time thinking or worrying. Just move on.