I’m just wondering what is the difference between the following two sentences:
I haven’t slept for two days.
I haven’t been sleeping for two days.
The context is about someone regrets about a mistake he has made.
The nuance between the two might be illustrated thus:
A man might tell his doctor:
I've been so worried about my son that I haven't slept for two days
That's to say that he has not been able to get to sleep at all for 48 hours.
Equally, a worker who has not made much progress on an urgent project, might tell a critical boss who accuses him of slacking:
I haven't been sleeping for (the past) two days, I've been working day and night.
The worker uses the contrast between sleeping and working to defend his efforts.
In short, it's just a question of which expression best fits a particular context.