It is also very important to remember that one must be eager to meet the Lord. It means that a faithful servant should not dislike death and must never be afraid of it. This is not to say that one must long for death. May God protect! One must never think of suicide because it is possible that one may, in ones lifetime repent for sins and do more good deeds. The meaning of being pleased with death is that whenever Almighty wants to him to die he should, in those circumstances, consider death a bounty because (according to Islam) he is a loyal and an obedient one of God and he will get great reward very soon and taste the sweetness of his good deeds and if he had been a sinner, his sins would come to an end and so also his punishment would decrease.
In short, a wise man should be pleased with death at the moment of God's will because death is the only means of scaling the peak of his good fortune, that is, to get rid of the web of deceptions and conspiracies and to enter the house of eternal happiness (Paradise) and to get nearness to God Almighty and to see the Holy Prophet and His Holy Progeny (a.s.) as well as to meet the shining souls of all pious people and Holy saints. The only way to get all this is death.
Similarly one must also like and be pleased with a long life and delay in death at the will of God so that he may, to the best of his or her ability, make provisions for the journey to the Hereafter.
source : http://www.maaref-foundation.com