The Catechism in Questions & Answers

704. What does support for the bereaved entail?

Grieving must be allowed. The important thing is to seek contact with the bereaved, express sympathy, and pray with them. It is important to impart a feeling of genuine sympathy to the bereaved. Despite any fears of saying the wrong words, it is important to reach out to them. “Fail not to be with them that weep, and mourn with them that mourn” (Ecclesiasticus 7: 34).
In coping with grief it can be especially helpful to point out that Jesus Christ also suffered and died. The resurrection of the dead is also founded on His resurrection. They share in the victory of Christ over death (cf. Romans 14: 7-9).