I know 关掉 to mean "turn off" but it doesn't seem to convey the sudden-ness or unwelcome connotation of "died". 突然关掉 is more precise but still seems to lack the negitivity. Also, as this is a common occurance, there must be a more colloquial way.
If it hangs (not responding to any input), you could say
If the screen blacks out, you could say
If it doesn't turn on, you could say
If it is completely broken and needs major repair, you could say
Note: All above are used in Mainland China. I know they're expressed differently in other Chinese-speaking regions (e.g. Taiwan) but I don't know what they should become.
I would translate "my computer died” to 我的电脑死机了.
I'd like also to comment on the differences bwtween the following words, based on my understanding. I would use
死机 when computer is running well but suddenly halts and gives no response but seemingly still running and still power-on.
当机 when computer is running well but suddenly shuts itself down automatically and maybe power-off as well.
坏了(坏掉了) when computer hardware/software is damaged and can't be started up.
完蛋了 when computer is totoally ruined (like fall into water)
不能用了 to cover all the cases above as a summary conclusion.