In the unfortunate event of being locked out of your home firstly I would recommend not to panic, it happens to all of us.
If you haven't a spare key stored somewhere safely then your only other option is to call Locksmith Local where we can have an engineer to you within 1 hour.
Do not smash the glass to gain access as this is highly dangerous and could cause injury. In most cases replacing the broken glass would out weight the cost of calling Locksmith local.