Wa alaykum salaam
Thank you for your question. From what you have described this is not really a question that can be answered online. It is important that if this continues you seek help from a person who is qualified to deal with these issues and can guide you.
I will generally advise you on a few things.
Firstly, do not try and solve this through practicing duas/dhikr/specific reading of ayat unless under guidance. What you can do yourself is make personal duas, seek forgiveness and make salawat. Secondly, try and remain in a state of ritual purity (ghusl and wudu). That is, do not sleep in the state of janabat and try and sleep in the state of wudu. Thirdly, do not distance yourself too much from people. Keep company that is of benefit especially to your religion and knowledge.
May Allah solve this issue for you by His love of the Infallibles (as).