Whether things will work out with you and your ex down the line, the fact is that you're trying to be friends right now. Don't approach your friendship thinking you've made a mistake with breaking up in the first place, all those emotions will just get in the way and cloud your judgement when it comes to interacting with them.