It isn't enough for YOU to class yourself as non-resident - you have to satisfy HMRC of your status as a non-resdident for tax purposes - that is the first step (P85 Form).
Having done that, even then, you STILL normally pay income tax on earnings ARISING in the UK. The exception may be if there is a double-taxation treaty with the country you went to (unlikely with Dubai, I suspect, since people go there to avoid income tax).
The way you describe this termination payment, it sounds like you were regarded as employed up to 30 June 2005 and the company was working through your notice period (irrespective of the fact you were effectively on gardening leave). That is a pity because HMRC will simply regard this as normal salary. If your employer had paid you a termination payment in lieu of notice, up to £30k of it could have been treated as not taxable or liable to NI deductions. The terms of the payment could have been structured that part of it was paid some length of time after your end of employment date without any problem. As it is, it sounds like your final date of employment was 30 June 2005 - not January 2005 - and I don't see how you are going to able to claim it back.
In any event, the starting point for all of this non-residency business is completion of the P85 Form. See here
http://www.hmrc.gov.uk/cnr/p85.pdf