First of all, why do you want to be friends with your ex?
Think about what you're doing. Will your choice hurt your girlfriend?
If you're afraid that you might fall for your ex, then you shouldn't become her friend.. do it for the sake of your relationship.