i have only seen 1 person overdose off heroin, this was 2 years ago me and my friend was round our dealers house (i always chill there) and my friend had a couple of temazepam (same as me) but i never realized he had been drinking all the day (these was super strength lager 9% shit), it wasn't until after he went over he said so, so anyway i bought a tenth, and we had some big shots, same amount i shot up myself, and he asked me to do his so i did, we both was nodding out but i could always control it, i was more gazing and nodding slightly, while my friend went into a deep nod and put his head back on the sofa, okey so we thought he was just high... it was like 5mins later when i noticed his breathing was going really deep and his lips started turning blue, so my dealer phoned for an ambulance, this came around 5mins later and rushed him to the hospital, where he got a shot to bring him back.
was a very scary experience for people round him but when he did come back he said he never known what happened after he went into that nod, so i wouldn't say it would be painful, rather just going to sleep... time when you do overdose verifies from person to person.
be safe, and try make sure someone is with you every time you shoot up and don't mix with alcohol!, you don't want to learn the hard way like most people i know!