The gratuity amount becomes part of the your husband's estate if it was given to him by the institution, with complete ownership granted. Alternatively, if the institution would have given the gratuity amount to your husband upon his request at any point during his lifetime, it also becomes part of your husband's estate. In this case, the amount is to be distributed among your husband's heirs according to the laws of inheritance prescribed by Shariah.
On the other hand, if the institution did not grant the gratuity amount to your husband, and they would not do so even at your husband's request during his lifetime, then this amount belongs to whoever is nominated as a beneficiary of the gratuity by the institution. Inheritance rulings will not apply to this amount as it is not owned by your husband, but rather by the nominated beneficiary. However, if the institution chooses to nominate all rightful heirs of your husband as beneficiaries of the gratuity, then this amount is to be distributed among all heirs according to the laws of inheritance prescribed by Shariah.
As for the ruling on provident funds, the amount received in the form of a provident fund is part of your husband's estate and thus should be distributed among the heirs according to the laws of inheritance prescribed by Shariah.
۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔۔
دلائل:
درر الحكام في شرح مجلة الأحكام: (المادة: 57، 57/1، ط: دار الجیل)
التبرع فالتبرع هو إعطاء الشيء غير الواجب، إعطاؤه إحسانا من المعطي.
و ایضاً: (المادة: 1092، 55/3، ط: دار الجیل)
"المادة (1092) (كما تكون أعيان المتوفى المتروكة مشتركة بين وارثيه على حسب حصصهم كذلك يكون الدين الذي له في ذمة آخر مشتركا بين وارثيه على حسب حصصهم)."
بدائع الصنائع: (57/7، ط: دار الکتب العلمیة)
لأن الإرث إنما يجري في المتروك من ملك أو حق للمورث على ما قال «- عليه الصلاة والسلام - من ترك مالا أو حقا فهو لورثته» ولم يوجد شيء من ذلك فلا يورث ولا يجري فيه التداخل
Allah the Almighty knows best.
Darul ifta Al-Ikhlas, Karachi.