Take a martial arts class that is slanted toward weapons retention, it will go a long way to ease your mind. Taking a gun from a person is not all that easy if they have some sense of awareness. Most criminals are probably paranoid committing a crime, so probably the last thing they want is a interaction where they might get shot.
You can also find videos on YouTube but make sure they are professionals that are doing the videos and have common sense techniques. If the actions seem to complicated you probably will not remember them. Do not practice them at home with a loaded gun, or even a unloaded one. Buy a cheap airsoft the same as your gun.
I had two unsuccessful gun grabs as a LEO, and both were with a thumb snap leather duty holster, both from behind. One a nurse friend that thought she was being cute, I fractured her wrist before I realized it was her. The other was a very serious attempt from a man's wife that I was trying to handcuff, she suffered a broken nose. The procedure I used is very simple. Grab the hand on the gun force it down to keep a draw from happening, and then spin your body away from the grabber. They will lose grip and balance, sometimes resulting in injuring their arm. While doing this their face will become a target for the off hand, they will be to busy trying to keep balance to defend. Most grabs are from the back, but if one should come from the front, grab the hand and start punching, depending on the location of your gun turn to bend the wrist of the grabber backwards.
I suggest going to a MA instructor though rather than videos or written directions. It is just not the same as hands on.