All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Suicide is a serious crime. Nonetheless, if the perpetrator of a suicide died as a Muslim, then he is not regarded a disbeliever. Rather, he is subject to the will of Allaah Almighty, Who may forgive and pardon him. This is the belief of Ahl As-Sunnah Wa Al-Jama‘ah. If the mentioned person died as a Muslim, then there is nothing wrong with dedicating the reward of Hajj, from which he will benefit, Allaah willing, to him. It is noteworthy that if the mentioned person died while he was able to perform Hajj and was subject to this obligation, Hajj must be performed on his behalf from his own money, before distributing the inheritance.
Allaah Knows best.