One of the first events I attended with my future in-laws was my husband's grandmother's memorial service. Several of his cousins' ex-wives were in attendance, because they had a good relationship and great fondness for the grandmother, even if their marriages didn't last. They didn't sit with the family, and there were no children involved, but they did talk to their exes and ex-mil to express their condolences.
The most recent in-law event was the funeral of my mother-in-law. The ex-wife of my DH's brother came; they were married over 20 years and had several children together before the angry, ugly split. The ex-wife simply ignored the new wife (yes, the cause of the split), supported her children who were grieving for their grandmother, said nice things to her former bil and sil and acted like a lady at the reception after the service.
So, I'd say go if you have a respect/close relationship for the deceased or need to support your kids. And if it might erupt, just send a card. I was impressed by everyone's behavior on both of these sad ocassions, so it can be done.