I am so sorry for the emotional pain you are going through. It is difficult to get up and face the world after it has come crashing down on you. From what you said in a comment you are going through a period of grief which is hard to handle. Believe me I know, as I lost my beloved 5 years ago and of course I had to continue to work since it was now my only income. Now your comment about losing your family may not mean they died, but losing them because they have turned you out for some reason (which often happens to gay people) is still a loss and you are still suffering from grief. I don't know which is true in your case, but the priciples of dealing with it are the same whether they are lost through death or other means.
First, I know you have a deadline, but you will get the work done faster if you give yourself permission to grieve and take a few days off and do just that. Even one day of just truly grieving will help you get control of your emotions enough to work.
Once you get back to work (or study which is essentially work), then sort out the tasks you have to do to meet the deadline and start with the ones that require the least thought. That will ease you back into working.
Accept that you will still need time to process and take breaks (breaks are better for productivity anyway). If you feel you need to cry, then take a break and cry. I cried multiple times a day every day for a year when Karl died. But cry for a few minutes, then get up and get some coffee or water or just walk around a minute and then back to work.
You will find that as you get back to doing the harder tasks that you'll be able to concentrate for longer and longer periods before it all comes crashing down but only if you let yourself have a little time to grieve before you get back to work. Otherwise the unexpressed emotions will keep you from concentrating. Since you are talking about work like writing a scientific paper, be aware that your first draft will probably be rougher than is your usual standard and that is OK. You would need to revise it anyway and by then, you will be in a better emotional state.
Meditation every morning will help as well. It helps clear the mind of all the stuff that is running around like a freight train in there. Another thing I found helpful ws to write down my feelings (grief, fear, lonliless, whatever) every night before bed. That helped me express them and it helped me sleep better because I didn't have those thoughts racing. Once the intial grief starts to ease, I also found that a daily practice of written gratitudes helped me greatly to focus on the good still in my life.
Sleep is important too. If you are having trouble sleeping, get some medical help. You don't need exhaustion on top of grief when trying to work.
If you can't refocus after a few days, then talk to a grief counselor or join a grief group. It helps to be with people who are going through the same thing or who understand it.
I've done a lot of blogging on grief and that, too, helped me process it. One of the things I've learned by interacting with alot of other people going through grief is that your own attitude can prolong your grief. That's why it is important to fully feel the feelings at first and then start to focus on other things. You have to get to the point where the grief is not the only thing in your life. Having something with a strict deadline is a good thing for this becasue it will force you to get back to living your life.
After all this, well you just keep on going. That's the real secret. You'll be surprised at how much you can accomplish if you just keep working at it every day.