533. Fasting on Shabbos

77:20 One may not refrain from eating on Shabbos by making even a short fast. Even if not intended as a fast, one may not refrain from eating on Shabbos as long as chatzos (halachic midday). (This is true even if one is learning Torah or davening, so the one leading services should not drag things out too long – Mishnah Brurah 288:2.)

77:21
One may not be sad on Shabbos over any misfortune. Rather, he should request mercy from Hashem. (One is allowed to cry on Shabbos if it will ease his pain – Rema 288:2.)