喜び and 悲しみ: naming emotions
Distinguish an emotion from the people involved when describing feeling or sharing joy and sorrow.
Names for feelings
喜び, read よろこび, is joy; 悲しみ, read かなしみ, is sorrow. 喜びを感じました says that someone felt joy.
悲しみが消えません。 means that the sorrow does not go away. The feeling remains; the sentence does not say it was absent.
Sharing a feeling
家族と喜びを分かち合いました。 means that someone shared their joy with their family. 家族と identifies the people involved, while 喜びを identifies the feeling shared.
友人の悲しみを理解したいです。 expresses a wish to understand a friend's sorrow. It is not a claim to have already understood it fully.
Cause and intensity
合格の喜び describes joy at passing an examination. 合格を喜ぶ uses a verb to express being pleased about passing, so the surrounding sentence structure changes.
深い悲しみ means deep sorrow. 深い describes the intensity of the emotion, but the phrase alone does not identify its cause.
In 家族と喜びを分かち合いました, who participated, and what was shared?
Show the answer and why
The family participated, and joy was shared. と and を distinguish these roles.

