Be sure and remove any flakes of paint that are loose. Nothing is as bad as filling in voids in a wall then because of loose paint it come back off.
Use joint compound to fill in the space. Thin it down so it is easy to use. Use a mud knife that is much wider than the space needing filled and do not overfill. Using a damp sponge instead of sandpaper to smooth it over before painting will keep the dust down to nothing. Be sure and "feather" the added joint compound you use to fill in the void.
You may have to do this a couple times before getting it fixed correctly. You can buy one gallon size bucket of compound. Water can be used to thin it down and stir it or use a potato masher to mix it up.