If you're concerned with the possibility of a spirit, I'd reach out to 1-2 medium / reiki specialists to see if they can figure out if it's something spiritual or not. I have some spirits attached to me that I've had to accept their permanent presence - they are quite stuck and adamant about staying until I die lol. They're dicks sometimes but it's mainly mutual stress about the situation in general + older shared trauma from this year. If it's a spirit, usually you can work with them. Just ask a lot of Why's and counter the bad vibes - you know you better than anyone, and only you can decide what or who you are. Go for confusing them if you'd like, but it is a person (IF it isn't your mind) separate from you so I try not to be too unpleasant - it's tricky but fortunately my situation is extremely rare.
In the case it's your own mind attacking itself, you can also still try to 'befriend' it to ease the damage it's doing while looking for psychiatry medication to dampen it. LSD and edibles assist when my guys get overwhelming for me, it affects anyone stuck too, and we're all more mellow lol