Can I keep using my old academic affiliation for publishing?
When you are really not affiliated to the institution anymore, you should not put it on your publications. Certainly not, when the work you are publishing has not been initiated during your stay at the institution.

Many institutions have the possibility to offer you a 'zero hours' contract. In this scheme you remain affiliated to the institution, and can use their facilities (e.g., email address, etc), but do not receive any monetary compensation.

If you agree to such an arrangement with your previous institution, you obviously can still use the affiliation on your publications.