I am sorry to hear that you were unwell and I hope that you are recovered. You will have to ask your university about its rules on resits. The rules vary from place to place. If you do have to leave the university, maybe work for a year or three and then re-try university as a mature student. Birkbeck and some other universities facilitate study alongside employment.