Here is an appropriate OT "type":
Then the Lord shut him in. Gen 7:16b
IOW, God protects us from ourselves.
I for one, am glad of that.
Back in the day before I was sure of my salvation, as I didn’t really know or understand all the promises concerning it, I told God that I was putting my salvation in HIS hands to take care of and keep.
And if it were possible that I could or would ever do something that would cause me to lose my salvation or I’d reach a point of denying Him and giving it up, that being of sound mind and body, He had my express permission to take my life before I’d ever give up on Him.