We consider a system of Brownian particles with long-range interactions. We go beyond the mean field approximation and take fluctuations into account. We introduce a new class of stochastic Fokker-Planck equations associated with a generalized thermodynamical formalism. Generalized thermodynamics arises in the case of complex systems experiencing small-scale constraints. In the limit of short-range interactions, we obtain a generalized class of stochastic Cahn-Hilliard equations. Our formalism has application for several systems of physical interest including self-gravitating Brownian particles, colloid particles at a fluid interface, superconductors of type II, nucleation, the chemotaxis of bacterial populations, and two-dimensional turbulence. We also introduce a new type of generalized entropy taking into account anomalous diffusion and exclusion or inclusion constraints.