You would need to enter the details in the capital gains section of the return, and either complete our worksheet to back up the loss or attach your own calculation. You can see guidance here:
Self Assessment: Capital gains summary (SA108)
There is a box here where you then enter the loss rather than profit. The loss will be there to carry forward when required.
If no other criteria is met for Self Assessment then you will no longer need to complete returns.
If you enter on the rental property section that rental income has ceased your record should be automatically closed.