I went through a short period in my teenage years of thinking like this, it was highly unpleasant, trying to function while at the same time believing it all to be 'unreal'.
Interestingly enough it also seems to be a common experience amongst people that have distressing near death experiences
//"I was rocketing through space like an astronaut without a capsule with immense speed and great distance. A small group of circles appeared ahead of me. To the right was just dark space. The circles were black and white and made a clicking sound as they snapped black to white and white to black. They were not evil exactly, just mocking and mechanistic. The message in their jeering was, "Your life never existed. The world never existed. Your family never existed. You were allowed to imagine it. You were allowed to make it up. It was never there. There was nothing there. There never was anything there. You're not real."//
The above quote can be found here
http://www.near-death.com/archetypal.html#a01
Some time ago I also read a forum where someone had posted a similar post to yours after smoking DMT (I think) and he had become convinced that only he existed and everything else was illusion. Cant find the post now but it was interesting to read.