There are many factors that can cause Tunnel vision such as damaged to the optic nerve, damaged retina or damaged brain etc. Also, A stroke, glaucoma or loss of blood to the brain can also be the causes of tunnel vision. And the treatment for the tunnel vision depends on the causes. So, you shall check your eyes first to find what causes it. Then consult your doctor for a suitable treatment.
Personally speaking, I would rather call tunnel vision a bad habit rather than a kind of eye disease. If you don' t have an optimistic mood, you may even want to kill yourself when you have it. Well, kidding you. Maybe you can try wearing glasses, which is good for reducing your scope of vision. By the way, just a pair of glasses is far from enough, you also need to turn your head very few min to try to focus on some other things. It is the most effective way for you.