Elder Kevin Pearson gave a Gen Conf talk in April 2009 that went into the "mechanics" of faith that I think can be applied to gratitude:
"Faith and fear cannot coexist. One gives way to the other. The simple fact is we all need to constantly build faith and overcome sources of destructive disbelief. The Savior’s teaching comparing faith to a grain of mustard seed recognizes this reality (see Matthew 13:31–32). Consider it this way: our net usable faith is what we have left to exercise after we subtract our sources of doubt and disbelief. You might ask yourself this question: 'Is my own net faith positive or negative?' If your faith exceeds your doubt and disbelief, the answer is likely positive. If you allow doubt and disbelief to control you, the answer might be negative."I think we can do something with gratitude to understand the factors that affect and limit our gratitude. I think it can be expressed in terms of an equation, like Elder Pearson laid out.