Either it's the batteries or maybe there is a loose wire somewhere inside. My guess would be the batteries though, especially if you've had your Tama running for a long time.
when you first get the tamagotchi it comes with the little tab that you have to pull out. if u stick it in the slot and pull it out again then it makes it go blank and a ton of other things happen. well i dont think that happened to you but... i thiunk its probly the batts. soo sad