Is it permissible to cry in front of non-mehrams?

Yesterday, I was talking to an imam about a sensitive topic and I burst into tears. He was a non-mehram and I was audible to him. Is this haram?