I don't know if anyone has mentioned this, but not being able to concentrate is one of the symptoms of depression.
Another thought: Homework can feel like a lonely, solitary process. Is it possible to get together with a friend or family member and sort of do it together? That might help.
I sympathize with what you're going through. Be gentle with yourself.