He has self professed OCD and says this is often why he takes so long. I do offer a lot help in his work but being somewhat new myself I am not always able to tell him how the systems here work.
I'm not trying to change behavior by telling manager, but more trying to have the manager pay attention to the hours he's working and maybe set an upper limit and make him go home after? I don't think his manager wants him hospitalized or burning out any more than I do.
I have suggested searching for other jobs but I think a combination of depression and helplessness prevents him from doing this. He has really low self esteem.
I feel your frustration. It's not really your problem, and it's irresponsible of his manager to let him wear himself down this way. His 'OCD' tendencies might well be an asset in the right context, like doing code review or QA or something instead of building code that's possibly meant to have a relatively short operating life.
Despite the way it seems, OCD is not a rational illness, nor does it make you "better" at anything. It's purely emotional, and you can't reason with it. The sufferer feels a huge amount of fear/anxiety related to issues that seem insignificant to a typical person, and they can't choose which issues they are.
In fact, telling him that he makes more mistakes when he's more tired may give him greater anxiety, which would feed the vicious cycle of "doing more work to make sure I didn't screw up" that's going on in his mind.
If he has self-diagnosed OCD and expressed it to you, you need to encourage him to get into treatment. It may be more comfortable for him to start with group therapy. You should encourage him to tell his family and seek their support.
Helping someone else through their mental illness is incredibly difficult, frustrating, time-consuming, and emotionally draining (depending on how cooperative they are). I know from personal experience. You should do some research to make sure you're giving appropriate advice and to understand what even a minimal amount of support would mean for you.
This is something you should discuss with an expert, ideally a local lawyer, but it's possible that your manager would be unable to immediately fire him without giving him the option to seek treatment first. I'm not suggesting that you tell your manager, only that you know the consequences of doing so.
If you really want to help him, you first need to talk to him about it. Tell him you've noticed how hard he's working, and you'd like to help if you can. Be clear that you don't mean you're going to help by doing his work for him. Rather, you'd like to listen to his side of the story and see if the two of you could brainstorm some solutions.
After you've done this, you may discover that some additional learning/training could help him move faster. That's a best-case scenario. Perhaps he's just not equipped for this job, and he could start job hunting while he's still employed with your firm.
You're more likely to notice some things that can't just be fixed. You may discover that anxiety or excessive attention to detail (perfectionism) are causing him to take much longer.
Those are issues that only he can work on, and he'd need to work on them only with psychiatric professionals.
No matter the size of your company, you're going to encounter people who can't do their jobs very well and are harming themselves and/or the company. It's really none of your business unless A) they're in danger, B) they're doing something illegal, or C) you're their superior. Be very certain that your coworker is in danger before you proceed.