You will need to show that this was your primary residence. I strongly recommend hiring a tenants attorney to help you through the process.
The answer to your question will in part depend on whether you, as a 'new tenant' would be eligible for the Section 8 subsidy. I would strongly suggest you speak to management.
Please be advised that this answer shall not constitute legal advice, or create an attorney-client relationship.
First, I am sorry for your loss. Unfortunately, you are right to have to consider these issues now. Under rent stabilization, you may be able to make an argument to keep the apartment if it was your residence too. However expect the landlord to fight you, and to spend some money. Section 8 is trickier. If you need it to stay apply on your own now to get approved. But, I am not sure you will be able to get this fast enough. Call a lawyer with real estate and estates experience.
Keep in mind the landlord will argue that you do not have succession rights because you were not on the lease for the past two years.
Any information published on this site is provided for general informational purposes only and is not legal advice. The above response is solely based on the limited information provided. Communicating through this site does not create an attorney-client relationship.