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.