45-year old Glen Roe, of No Fixed Address, smashed his way into a house in Worksop through a ground floor window before carrying out the terrifying attack in the early hours of August 2 2018.
Roe pointed the handgun at the woman’s head and told her from the outset that he was planning to kill her and himself after the attack.
He later said he would not kill her but intended to have a shootout with the police.
However, he left without discharging the gun.
The victim was terrified throughout the incident and thought the gun was real - although the police investigation later confirmed it was an imitation firearm.
Roe was arrested on August 5 and was later charged with two offences of rape, a sexual assault, making threats to kill and possession of an imitation firearm with intent to cause fear.
He denied the offences but was found guilty on all counts on Friday (1February 1) after a trial at Nottingham Crown Court.
He was remanded in custody to be sentenced at the same court on March 11.
Judge Gregory Dickinson QC warned Roe he could expect a lengthy jail term.
Officer on the case Detective Constable Janet Percival said: “The attack left the victim extremely distressed and must have been absolutely terrifying for her. She was extremely brave to go through the court process.
“I hope the conviction will give her some comfort as Roe is likely to be locked up for a significant time when he is sentenced.”