All perfect praise be to Allah, The Lord of The Worlds, and may His peace and blessings be upon our Prophet Muhammad and upon all of his family and companions.
Congregational prayer is a confirmed Sunnah. However, the person who suffers from a mental disease is permitted to perform it at home when the following conditions are met:
First: There is neither cure nor prevention.
Second: Performing the congregational prayer poses a great difficulty to the patient himself or those praying beside him. As for the Friday prayer, if the conditions mentioned above are met, then he is permitted to perform it at home as noon prayer {Four Rakahs}, but if his disease was discontinuous, then he is obliged to perform it at the mosque, as the disease`s intensity is reduced.
Furthermore, Al-Imam Al-Shirbini (May Allah have mercy on his soul) said (What means): "It is permissible for whoever has a valid excuse, such as a disease, not to attend the congregational prayer… Ibn Abbas (May Allah be pleased with him) said (What means):"According to our fellow scholars, the Friday prayer takes the same rulings of congregational prayer." [Mughni Al-Muhtaj, vol.3, pp./425].
Therefore, if it is hard for you (Questioner) to perform congregational prayer, then you are permitted to perform it at home. But, as for Friday prayer, we advise you to strive to offer it at the mosque since doing so could be the cure for your disease. And Allah Knows Best.