If it has been years since you have last seen him then no. If it's been recent and you split up on a friendly basis then it would be just fine to go to the funeral out of respect. If this makes you feel uncomfortable then send a nice Sympathy Card or flowers to your exe's home.
My ex husband's brother passed away from a congentital heart problem (died within seconds while getting out bed) at the age of 40. I decided not to attend the funeral out of respect for my ex's new wife and his two daughters, but I did send a Sympathy Card to the family.
It is not respectful to attend your exhusband's funeral. You are divorced. You are not married.