An inmate who was found dead in his cell was “isolated” and had a history of depression and suicide, an inquest has heard.