Looking at chapter 6 of the Sermon on the Mount. It looks like an introduction to what a life lived should look like (since chapter 5 showed what it should not look like.)
Word Biblical Commentary says, "Although dikaiosune can also mean "almsgiving" and thus some have tried to associate this verse with vv 2-4, the formal analysis shows that v 1, rather than being a part of the section that follows, is better understood as an introduction to all three sections. The deeds may be thought of as the Christian's self-offering in "spiritual service" and may correspond to the demand of the Shema (Deut 6:4-5) to love God with all your heart (prayer), soul (fasting), and might (almsgiving), with the order changed to move from easier to harder. The phrase "before others," is intensified by the following "to be seen by them." This is an emphasis found in all three sections. Those who do their righteous deeds in order to be observed by others are described as "hypocrites" in each of the three following sections (vv 2,5, and 16)."
It seems that each of the righteous acts done with the proper attitude bring reward to the doer. I assume that reward is life, not as in length, but in fullness.
"The word hypocrite in Hellenistic Greek commonly meant actor, i.e., one who performs in front of others, pretending to be something he or she is not."
The point I see is that fullness of life comes from God as a gift. Through our anger, lust, etc, we strive to take life, and as we do take what we can get, we forfeit what God would give us. It is either/or. You have to trust God and let go of your own options. So God would have you pray, give, and fast. These are really interesting because praying is seeking what God would have you do rather than what you would choose to do. Fasting is giving up a normal amount of something rather than our typical desire to gorge on something. These are all three specific actions that take us in the opposite direction of our typical desires.