You maybe facing a runout of RAM either physical or virtual via your drive.
This series is limited to 8 GB of RAM so if you have only 4 GB then you’ll want to max it out.
The need issue is virtual RAM which leverages the drive. So you can encounter issues is the drive is overly full and if it have a corruption that can cause a panic call.
I would recommend replacing your original HDD to a SSD. But you need to be careful! Your system only offers a SATA II (3.0 Gb/s) interface as such the drive you put in must be able to run at this slower I/O. Most drives today are fixed speed running at SATA III (6.0 Gb/s). You’ll need to either get a SATA II SSD or one that auto senses the systems I/O speed and matches it. As an example OWC still offers a fixed SATA II (3.0 Gb/s) SSD [https://eshop.macsales.com/item/OWC/S3D7E3GT1.0/|OWC 1.0TB Mercury Electra 3G] or using this auto sense drive from Samsung [https://s3.ap-northeast-2.amazonaws.com/global.semi.static/Samsung_SSD_860_EVO_Data_Sheet_Rev1.pdf|Samsung 860 EVO SSD]. Ing you use anything else take note of what the spec sheet lists if it doesn’t list SATA II (3.0 Gb/s) find a different drive!