If you have gone past the rebuy screen (sounds like you have) then you are out of luck. Hard lesson but there you are, everyone says don't fly without the rebuy but people will still push their luck.
For future reference, if you don't have enough credits for the rebuy you can de-select modules to get the rebuy cost down - maybe enough to get most of your ship and gear back. In the past people were able to get a "loan" to cover shortfalls in the rebuy - I don't know if that is still available. (I play "plastic man" - on destruction I select the free sidewinder at my starting location - that way I don't have any insurance claims in my stats but don't lose my engineer progress that comes from "iron man" - clear save restarts - that I used to do.)
So, next time - take a long hard read of the rebuy screen options and see if you can find a way through.
BTW - There is always a possibility of raising a support ticket (
https://customersupport.frontier.co.uk/hc/en-us ) asking if they can make an exception and restore your lost ship - I believe they have done this in the past from time to time, it won't hurt to ask.