Edin Dzeko struck twice to edge the five goal thriller.
“This win was fundamental for us and you could tell by the celebrations," Pellegrini told Roma TV.
“We simply had to get the points and Frosinone were very aggressive. We proved that we are always fighting to the end, we take this crucial victory home.
“Tonight the result was too important, so we couldn't focus much on quality and had to fight it out with Frosinone on a different level.
“I dedicate my goal to my wife and the little girl we are expecting together."