The Gemara (Sukkah 25b) mentions that an avel (mourner) is obligated in the mitzvah of Sukkah. One might have thought that since someone who is mitzta'er (in pain) is exempt from the mitzvah, that an avel, due to his emotional pain, would also be exempt.
The Gemara concludes that, since his worries are "divrei reshus" (not obligatory, in contrast to someone who is worried about performing a mitzvah properly), that he should be able to take his mind off it -- achieve yishuv ha'daas -- and focus on the mitzvah of sukkah.
I've looked around in some standard commentaries of aggadah hoping to find details about how a person should actually accomplish this yishuv ha'daas. I've looked in the commentaries of the Ein Yaakov, in B'Nei Yehoyada, and the Maharal. I've also checked out the index of Alei Shur and Michtav M'eliyahu for any references to this Gemara, but found none.
Do you know of any sources that do elaborate on this?