I think the power of what you have termed 'giving inspite of misery' relates to the mystery of sacrifice. It is easy and good to give when you have plenty, however when a person truly sacrifices it is then that you participate in something which is related to the divine creative act. This is a very profound subject and relates to the very origin of order in our universe. In the natural world sacrifice is tightly coupled to the emergence of life.
The prophet founder of the Baha'i faith, Bahá’u’lláh explains that the sacrifice of Christ is what is responsible for the development of human civilization.
"Know thou that when the Son of Man yielded up His breath to God, the whole creation wept with a great weeping. By sacrificing Himself, however, a fresh capacity was infused into all created things. Its evidences, as witnessed in all the peoples of the earth, are now manifest before thee. The deepest wisdom which the sages have uttered, the profoundest learning which any mind hath unfolded, the arts which the ablest hands have produced, the influence exerted by the most potent of rulers, are but manifestations of the quickening power released by His transcendent, His all-pervasive, and resplendent Spirit.
We testify that when He came into the world, He shed the splendor of His glory upon all created things. Through Him the leper recovered from the leprosy of perversity and ignorance. Through Him, the unchaste and wayward were healed. Through His power, born of Almighty God, the eyes of the blind were opened, and the soul of the sinner sanctified."
(Gleanings from the Writings of Bahá’u’lláh)