I had a similar problem when I saw my ex fiance. Basically you don't want to portray any negative emotions in your words or body language, just a simple "Hey how are you doing?" will be enough. Don't try to stand around making conversation because this will probably make you both feel abit awkward. I don't know your ex personally so I and nobody else can say for certain what they're thinking about the situation so you're just gonna have to go for it. If you have hopes of maybe one day getting back together then talking a little bit won't hurt, it should technically help. You just want to make sure that you don't suddenly keep talking to her ALL the time and following her around etc.. There's a difference between being friendly and being clingy
Also i'm very sorry to hear about your friend, and your break up with your fiance too. Pulling yourself together through a breakup is hard enough without having to lose a friend.. If you ever feel like talking don't think twice about sending me a PM..
Take care!
You never know what you've got, until it's gone...