You are in a panic. Deadline a few days / hours, and maybe less. In your head you are already writing an acquittal story, representing the face of an angry boss or team leader, and then see the cost of tickets to Irkutsk. Do not do it this way.

Instead of wasting time on a tantrum: drink valerian (only to calm the trembling in the hands) and send a letter that explains the situation to the management.
// What should be in it:
1. Take responsibility
For the disruption of the deadline has not killed anyone. For the management, your confession letter means that you understood where you made a mistake, admitted an error to yourself and others, you do not give a damn, and you can prevent disruptions in the future. If you make excuses, you will be considered an irresponsible employee (this will happen).
')
2. Set new dates
Report on the deadlines for which you really have time to prepare everything. (You do not want to send such a letter again?!). Take more time than you plan to spend on work. Then you will send the complete and final version.
3. Promise not to repeat mistakes.
Everyone makes mistakes, and you are no exception. And if this happens to you for the first time (and we hope that this is so), you will be understood. But still you have to convince others that you have drawn conclusions and no longer delay the deadlines.
// Now connect everything
Your letter should turn out like this:

So, you have found the strength to admit defeat and report it. Your leader may be in shock / trance / rage, or he may laugh and say that nothing terrible has happened. Remember that you must be ready for any answer (and what would you say in his place?).
Such a “surrender” will only work if this is really your first failure (is that so yes?). Try to plan work: get a notebook, make a plan, write a list of tasks. Then you will not have to make excuses!