Thanks for the letter. I see the problem and you have rightly made the complaint to O2.
If that does not resolve the matter ask them for a final response letter (a "deadlock" letter).
Once you have the deadlock letter the next step would be to escalate this to the adjudication scheme (CISAS) - they will investigate and liaise with O2 which would hopefully result in a refund of any monies paid and a cancellation of their bill which they seem to be demanding from you.
They can also order the phone company to make a financial award if they have acted poorly.
The service is covered by the Consumer Rights Act 2015 so you have a right to expect a reasonable service - if they do not provide that then the regulator will step in but it also means you can sue for any damages or losses incurred as a result of O2's conduct.
You can escalate to the adjudicator here : https://www.cedr.com/consumer/cisas
If you have lost any money then you could sue O2 but the court may consider that to be premature if you do not go through CISAS first of all.
You can sue for your losses via the http://www.moneyclaim.gov.uk website which is easy to use and no lawyer would be required. Of course you can also come back to this site where I would be happy to help you going forwards. I can answer any other questions you might have so please let me know.
I hope this helps - if you can please accept the answer and give me a 5 star rating (there should be a button at the top of your screen to do this), I can answer follow up Q&A's at no extra charge and Just Answer will credit me for helping you today.