Present perfect continuous
In this case, “had” doesn’t change depending on the subject (whether it is singular or plural) – it’s just always “had.” “He had been in my thoughts for a long time.” The action here was in the past and seems to have ended in the present