Do you hear a sort of clicking sound when it dies? As in a single click.
It's unlikely that the generic battery, if it has the same voltage and current ratings, has damaged the machine. More likely is that the notebook's components have reached the MTBF.
More on-topic, Captain Obvious tells me that since the problem occurs whether plugged in or not, it's likely not the battery.
Does it ever happen within 5 minutes of turning it on from cold? If not then, as mentioned above, heat could be the culprit. And heat could be due to a build up of dust and such. Is the CPU fan turning?