From Sing, You Righteous by Rabbi Avigdor Miller
“Those who keep Shabbas rejoice in Your kingship” (Shabbas Shemoneh Esreh), for His kingship means that everything that exists or transpires is benevolently purposeful, and therefore pessimism has no place. This Shabbas-study flows over into the weekdays; the understanding of Creation ex Nihilo (from nothing) and the reflection in the wisdom and kindliness of Creation pervades the entire life of the Torah-Jew.
Unhampered by the dogmas of the spurious religions and the distortions of the academicians, the Jew has a clear and incontrovertible Torah which lends him confidence and peace of mind.
All sadness results from estrangement from the True Knowledge of G-d and His Torah
He who pursues the Shabbas-lessons of the Good Mind gains therefrom all forms of happiness, for “A good heart is an everlasting feast” (Mishlei 15:15), and the entire world is his banquet-table. Therefore, “Happy are they who sit in Your house” (Tehillim 84:5), and “Happy are all who trust in Him” (ibid., 2:12); “Happy is the nation whose G-d is the L-rd” (ibid., 33:12); “Happy is the man whose strength is in You” (ibid., 84: 6).
All sadness results from estrangement from the True Knowledge of G-d and His Torah; “Strength and joy are in His place” (I Chronicles 16:27). As one comes closer to Him, his happiness increases. The joy of the Afterlife consists of the supreme closeness. Now, the Menuchah of the Shabbas and the Oneg of the Shabbas constitute a rehearsal for the Afterlife.