Does my cat have mental issues?

So, if he is awake, he is almost constantly pacing, smelling everything, meowing and yowling really loud and occasionally if there is something on the ground he will stand in front of it paw at it for 10 or 15 minutes. He also rubs on everything and he sprays alot. When is no pacing he is sitting down, but he never sits for more than 5 or 10 minutes and then goes back to what he was doing. He follows the same path and sometimes when he is doing it he is so focused that he just does not even respond to anything other than physically picking him up. Yester day he did it from 10pm to 7am. I thought maybe he just did not like me for some reason because he pulls away when anybody tries to pet him but I no longer think that is the case because he does typically follow me and stay in whatever room I am in and when I live the moment i close the door he starts freaking out and when i get back he is typically meowing as loud as he can and when I come inside he acts like he hasnt seen my in years and wont leave me alone for 10 - 15 minutes. I know cats can get OCD and anxiety and alot of his actions seem to be the result of OCD and anxiety but are cats intelligent enough to understand things like that, is he suffering?

Mismatched Tube Socks2021-02-08T09:07:53Z

Have him neutered and get him some stimulating toys to keep him entertained when you are not at home.

jean2021-02-08T09:07:24Z

Is the cat desexed? If not he may be frustrated. A plug in product called Feliway can help a cat who is in a bad mood. It releases pheremones which improve the cats mood.