Ok I found one file that causes a BSOD, it called ETD.sys from your mini dump file.
To read more about ETD.sys please follow the link don't download anything there, I send to you to just get an information about the file https://www.file.net/process/etd.sys.html
KMODE_EXCEPTION_NOT_HANDLED ETD.sys+4e9d6 (relate to mouse pad) (is possible your black screen is caused by this ETD.sys) Get an external mouse ready in case your mouse pad refuses to work after the modification we are going to do. Here is what you are going to do.
open command prompt as admin
cd\ (hit enter key on your keyboard)
C:>
C:>cd windows\system32\drivers (hit enter key)
C:\Windows\System32\drivers> ren etd.sys etd.sys.old (hit enter key) (ren command is to Renames a file or files)
Then reboot your laptop
Work with your computer as you did and see if the blank screen is still there, we close the laptop lid when we use an external monitor connected to the laptop ports (vga, hdmi,dvi). You can still close it to see if it freezes. Leave a feedback
Hey, I tried this after I reinstalled factory version drivers of Elan touchpad as I told you before that I was using unofficial drivers which u said was the reason for BSOD. but now after reinstalling official HP drivers and running those commands it showed the ETD.sys file is not present(I think that file was of unofficial drivers). So I tried closing the Lid again and the BlackSOD happened again I had to hard reboot my laptop. So I'm sharing the dump files again to see if you can get any other error msgs.
Link - https://1drv.ms/u/s!AtuSyEHlaqZvlDiKS9wKLjr6DU5z?e=K5Estc
And this is even happening after connecting the HDMI cable. One thing I observed that when I closed the lid jus enough for the screen to turn off and while the HDMI cable connected I tried to move the mouse with touchpad and tapping keys and they didn't respond after closing the lid but when I opened the lid they worked only External mouse worked at that time.