Calculating Timer Tick STM32F4
The prescaler register description states, that the input clock is divided by the register value + 1. So if your input frequency is 84 MHz and you want the timer to count at 1 MHz you have to program 84-1 to the PSC register to get a divider of 84 and thus a counter clock of 1 MHz.

The internal PSC counter is not accessible, so there is no work around for the 16 bit limitation.

Program the ARR register with 39999, the overflow will occur on the next (the 40000th edge).