Gratitude is a central principle of the gospel of Jesus Christ. In the scriptures, it says the following:
And inasmuch as ye do these things with thanksgiving, with cheerful hearts and countenances, not with much laughter, for this is sin, but with a glad heart and a cheerful countenance—Verily I say, that inasmuch as ye do this, the fulness of the earth is yours, the beasts of the field and the fowls of the air, and that which climbeth upon the trees and walketh upon the earth; Yea, and the herb, and the good things which come of the earth, whether for food or for raiment, or for houses, or for barns, or for orchards, or for gardens, or for vineyards; Yea, all things which come of the earth, in the season thereof, are made for the benefit and the use of man, both to please the eye and to gladden the heart; Yea, for food and for raiment, for taste and for smell, to strengthen the body and to enliven the soul. And it pleaseth God that he hath given all these things unto man; for unto this end were they made to be used, with judgment, not to excess, neither by extortion. And in nothing doth man offend God, or against none is his wrath kindled, save those who confess not his hand in all things, and obey not his commandments (Doctrine and Covenants 59:15–21).
A believer with a grateful heart will serve God and fellowmen, will be satisfied with the material portion he or she receives, and will be optimistic and hopeful. Thus, it is almost impossible to live the gospel without being grateful first.
I say unto you, my brethren, that if you should render all the thanks and praise which your whole soul has power to possess, to that God who has created you, and has kept and preserved you, and has caused that ye should rejoice, and has granted that ye should live in peace one with another—I say unto you that if ye should serve him who has created you from the beginning, and is preserving you from day to day, by lending you breath, that ye may live and move and do according to your own will, and even supporting you from one moment to another—I say, if ye should serve him with all your whole souls yet ye would be unprofitable servants.(Mosiah 2:19–21)
Nothing we can do can repay our debt to God for granting us life and the blessings of the earth and the atonement with its promise of resurrection and exaltation; thus, even if life is dire and difficult, we have much to be grateful for.