Hi
For the UK income, declare only the amount up to the date you left but declare all the tax deducted and this will work out the refund for you.
You cannot file online as the residence section is not supported with HMRC software and will need to purchase 3rd party -
Self Assessment commercial software suppliers.
You should still include the HS304 to clarify.
Thank you