Start with our concept of the physiological nature of shame. Tomkins suggests that the affect itself (not the mature emotion) is an amplification of what happens when the good feelings of interest-excitement or enjoyment-joy have been impeded when there is plenty of reason for them to have continued. You and I, for example, are communing with our sense of the goodness of God and the joy brought by our understanding that this goodness can shine its bright light into the darkest of moments. All at once, one of us (while thinking about these matters) has a thought in association to these happy ideas, a thought that distracts us for the briefest of moments. The intrusive thought (quite natural, part of the normal mechanisms that make the human so creative, so flexible) must trigger its own amplifying affect, which therefore must interfere with whatever was going on between us and make its presence known on the face of its originator. This change in expression interrupts the mutuality of interaffectivity that had been going on, and is a competent trigger of shame affect which pulls one away from interaction. Empirically, it is shame affect that separates people from their good feelings, from their otherwise normal ability to enjoy the best life has to offer. A science of religion and religious worship must take into account the biological nature of the two positive affects and the biological nature of the negative affect that normally interferes with the expression and maintenance of interest and joy.
In a world that increasingly humiliates people for their experience of any simple joys, religious training and experience is a vital source to train us to overlook the normative shaming that pulls us away from the religion within us. Encouragement toward interest-excitement and enjoyment-joy is always (covertly or directly) encouragement to overcome the shame affect that normally prevents our experience of positive affect. Discussed as such or not, the recognition of or lysis of shame is central to worship in a world that consistently shames those who would live with joy. We do this when we celebrate within a religious community and when we encourage religious thought in a solitary individual.
That said, I yield to my betters in this area. I will alert two of the leading thinkers on religion in the Tomkins Institute (Dave McShane and Sue Deppe) and ask them to add their wisdom to this thread. You might be interested to learn that approximately 10% of the Tomkins Institute membership is clergy. In each of the past two annual meetings we have presented work on religion in psychotherapy, for I believe that any system of thought that brings solace to the wounded must be incorporated within our systems of healing. To do otherwise would be to overlook at least one aspect of what helps people.