This appears to be a personality disorder. He has not received a proper training and persistent following of a job which he liked and could have mastered the subject.. That could have given him satisfaction.
Next Steps
We need to go over his past details. Reorganisation of his career with availability of a position with lot of reassurance and guidance and treatment from a psychiatrist ought to help.
Health Tips
Try to be optimistic and not to change jobs.