Reason of bheesham dying such a painful death on beds of arrow was coz he was cursed in previous life by vasistha lord Ram's guru. He was a astha vasu brother prahasawho made plan 2 steal divine kamdhenu cow from vaisistha's ashram along with his 8 brothers ( I m not sure of d number ) , vasistha cursed him that him 2 born in mortal world, thou he was blessed to be illustrious warrior.
During his life as bheesam , he unknowingly coz lot a pain to a snake also.
One day bheesam was passing through a jungle he found an injured snake on his way , he picked d snake by sword & throwed him off d cliff , unfortunately snake got stuck on thorny bushes for 18 days , so bheesam 2 laid on bed of arrows for 18 days.