Breaking up with your partner needn't be the end of your friendship. With a little effort and compassion, it's often possible to retain some of the good parts of your relationship.
Any kind of break up can be hard, so give each other some space and time to recover. In the meantime, keep in touch as best you can.
Being friends in future will be about finding new ways to enjoy each other's company.