Thinking of death as in 'I wonder what happens after I die' or 'I think dying like this would hurt' is completely okay...
Thinking of death as 'I wish I was dead now' is not imo, you should cheer up if that's the case and if you feel like it too much and think about hurting yourself, maybe it would be wise to talk to someone close to you about it or visit a psycologist (?)