Your glass shop will have near invisible and near flush mount mirror clips. Use as many as needed for the thickness and weight of glass you have to mount the glass to the wall. Then use your idea and cut a recess in the back of your picture frame (notch out a bit extra for the mirror clips if you have to do so) to fit over the mirror glass. Fasten the frame to the wall as a separate unit.
This way you do not rely on the picture frame molding to hold the glass and should you break it you can easily replace it.
Another option is to buy molding that has enough space in back for you to glue a lip strip to the mirror with construction adhesive and screwed to the wall. The lip on the mirror sits on the lip on the wall and the frame would be flush to the wall. Key would be finding the molding with a deep enough space.