Particle flow filters that smoothly transform particles from being samples of a prior distribution to samples of a posterior, are a major topic of active research. In this work, we introduce a generalized data assimilation framework called the Variational Fokker-Planck method for filtering and smoothing whose specific implementations are the previously known methods such as the mapping particle filter and Langevin-based filters. Using the properties of an optimal Ito process that drives the corresponding Fokker-Planck equation, we derive natural dynamics for known heuristics such as particle rejuvenation and regularization to fit into the said framework. We also extend our framework to higher dimensions using localization and covariance shrinkage, and provide a robust implicit-explicit method for evolving the Ito process, as a stochastic initial value problem. The effectiveness of the variational Fokker-Planck method is demonstrated on three incrementally challenging test problems, namely the Lorenz '63, Lorenz '96 and the quasi-geostrophic equations.