Hello sasha__el and welcome to FT, it's a shame it's under these circumstances.
IANAL but here's my take.
However the EU regulation states if the flight is delayed for over 5 hours we have a right to cancel the flight.
This is true but you cancelling your tickets is not the same things as the airline cancelling the flight. What you should do is declare the "trip in vain".
Moreover any delays over three hours are treated as cancels in relation to the compensation.
The regulations don't actually say this. A CJEU judgement [Sturgeon v Condor Flugdienst GmbH (C-402/07)] does say:
2. Articles 5, 6 and 7 of Regulation No 261/2004 must be interpreted as meaning that passengers whose flights are delayed may be treated, for the purposes of the application of the right to compensation, as passengers whose flights are cancelled and they may thus rely on the right to compensation laid down in Article 7 of the regulation where they suffer, on account of a flight delay, a loss of time equal to or in excess of three hours, that is, where they reach their final destination three hours or more after the arrival time originally scheduled by the air carrier. Such a delay does not, however, entitle passengers to compensation if the air carrier can prove that the long delay was caused by extraordinary circumstances which could not have been avoided even if all reasonable measures had been taken, namely circumstances beyond the actual control of the air carrier.
From:
https://www.flight-delayed.co.uk/sturgeon-ruling
(My bold)
The bold bit is where you may run into trouble. You didn't actually arrive at the destination at all so this particular decision does not necessarily apply. I would certainly expect an airline to argue the point. Had it said, "where they
would reach their final destination three hours or more after the arrival time originally scheduled by the air carrier." Then you would be home and dry.
I really feel for you in that the delay was so long as to make the point of the trip worthless (trip in vain) and that in your circumstances a long delay and cancellation are effectively the same thing. However getting a lawyer to agree to what you and I think is another matter.
To take this further I suspect you will have to either go to arbitration and expect the airline to reply with the narrow definition in Sturgeon v Condor or engage one of the no-win no-fee flight delay companies to fight it for you on the basis that 2/3rds of the compensation is better than nothing if you win and after they take their fee.