I'm sorry to hear that you and your girlfriend have broken up.
It is nice to see that you want to remain friends and do not want to jeopardize that in the long term.
It is difficult. Sometimes it's easier for one partner to drift straight into friendship.
I think the best way forward would be to write her a letter, or speak to her in person if you prefer, and gently and respectfully explain that your friendship means so much to you that you don't want to ruin it.
I would proceed softly - it should give her the inspiration to be soft and kind in return.