In answering i will assume that this is an actual posession but this isn't a medical advice or a judgement of what it is you are dealing with, i will simply answer as if a person is actually posessed.
You can try doing what the Atanatiya Sutta says, find a big tree in the forest and complain out loud about the Yakkha harassing you.
I don't know what else you can do other than developing the mind but you are saying you can't meditate which pretty much rules out any fortification of the mind necessary to deflect an attack.
Therefore you basically need some sort excorcism and afaik nobody really knows how to do it. I also think that if you stayed with Ariya they might be able to exert some influence.
Furthermore people and monks will assume you are schizophrenic and might take advantage of you for personal gain.
In summary i think developing the mind in spite of the harassment is your best bet and if you can't do it then maybe you can learn to do it and if you can't learn to do it then you need something akin to staying with protected people or people able to protect themselves or in a protected monastery but this is not at all easy to find.
I think nowadays it is easier to find a monastery haunted by evil spirits than one with proper protections. I think it would make sense to go to the oldest monasteries because these probably at least had protection in the past.
Yakkha and Maras are as real as it gets and they really do not like Buddhism, they are however not that powerful and if one doesn't panic then one can beat their mind with one's mind. You can do this by remaining mindful of the Buddha, Dhamma & the Sangha, being mindful of feelings & perceptions before, during and after an attack.
Embrace it, prepare for it and if you get scared think of the home team, the Sangha, the Buddha and remember that he does not get scared and the team bothering you has already lost in the Dhamma, they lost the war and if you read the Atanatiya, they are generally not allowed to pester disciples but some are still pestering the disciples to minimize attainments among humans. You can generally expect them to have a nervous breakdown if you decide to take a firm stand in not being swayed even if it was to kill you.
Also yogi should realize that if indeed is harassed by Yakkha or Mara then they just are trying to stop you from training and helping others. They don't generally want to kill you because it doesn't accomplish what they want which is for one to be swayed away from the Dhamma or progress as slowly as possible.
Dealing with Yakkhas might also motivate one to train harder and taking the Dhamma more seriously, if their shinanigans are then having this opposite effect then they are likely to stop seeing how they just fuel your motivation.
Just don't do anything extreme like suicide and cooperate with doctors if you feel overwhelmed. You deserve a lot of respect and praise in dealing with this circumstance whether it is methaphysical or hallucinations, you should also keep in mind that this is temporary and human life is short, it's not going to be a factor forever so don't let it do too much damage due to being shortsighted.
Unfortunately dealing with Yakkhas, having visions and all these weird things are more or less a part of the training. Sometimes a yogi will feel it's too much and might not want to train because a part of him dreads having visions because it's so alienating & scary to navigate alone.