It's the other way around. His powers were going out because he was depressed. Or more specifically, because of anxiety caused by super stressful life style. The whole movie is about him sort of coming to terms with the responsibility of being a superhero.
Well, for one, he's not Lobo to be lopping people's heads off at the slightest provocation, lol. He was kinda put on the spot with a gun pointed at his dick with a bunch of people standing just outside the car. Kind of a pickle if you ask me, especially if you wanna keep a low profile as a superhero. Not to mention that the guy threatened his family as well, so Peter did the right thing and waited until he didn't have a gun pointed at him and didn't had to fight there in front of everyone before he decided to go after the bad guy.
Dude, peter has super human reflexes and speed, he could have fucked up the dude at any given moment, guns or not, let's be real.
And exactly why he threat his family that he should have been clear with the dude and not act like a pussy.
Imagine if you had the same powers as peter and this old dude was threatening your family...
It was a well acted scene, one of the best in movie, but stupid nevertheless.
He could have just break both his hands or legs to take him out, and instead he wait even if he knows that the dude is dangerous and up to no good.
If someone die during their final fights it would be all on peter shoulders for not stopping the guy when he had the chance to do it but it was to pussy to act.