I agree with Omar: often it is better to re-start. You need to suffer, so that you learn to never Apply the Rotation again (unless you really can’t avoid it)!
But here’s a way to do it:
The trick is to make a new Custom Orientation in Edit Mode and then enable ‘Affect Only Origins’ and Align to Transform Orientation:

Don’t forget to un-check ‘Origins’ when you’ve done this.
Then, in Object Mode, you can simply Clear the Rotation with ALT+R.