This article [here] gives helpful pointers in regard to how to support someone who has had a miscarriage. However, it offers some general principles that may be helpful to support people who have experienced some other types of very painful losses as well.