I work as a Software Manager in Singapore. We accept & develop software projects for client in a team. My project team and I have been working on a project for around 9 months now.
Last week, one of my project teammate (Engineer A) started to have a change in personality and avoids the team. He doesn't join us for lunch nor talk to us much, including things he should talk to us about regarding the projects (Such as software bugs). Initially, we all believe that he is trying to be more productive, but the engineer that sit diagonally behind him (Engineer B, which allow him to see Engineer A's screen) commented that he has been staring at empty pages for a long period of time without doing anything. His commit counts also drastically dropped. Being concerned, we approached him several time and asked if everything is all right as this is affecting his work performance. He said he is fine initially and we took it at face value. This then continued since with no signs of improvement.
On the time he actually talked to me, he requested for me to take a look at his code because there was some conflict. Turns out, the bug is from using uninitialized variables and simple programming issues. One of the other engineer have also asked him if he is fine personally, but he seems incredibly hostile with his replies like "I am fine. Should there be things you should be fixing now? Can you please go back." He previously has been a responsible, friendly and good performer before this. What are some advised actions I can take to resolve this?
UPDATE 1: The project manager is aware of this problem and asked the team some feedback. The team agreed to try and assist him. Will greatly appreciate further advice.
UPDATE 2: We have given him 3 days off to fix his issue. If the issue isn't fixed in 2 days, we will have to let him go to not compromise the project.
UPDATE 3: We let him go in the end because he is not willing to fix his problem.