Are both ground pins on the ATMEGA internally connected?
No, there is no internal connection. One ground is Digital ground, the other Analog Ground, and they should be connected through an inductor capacitor circuit for best performance. I know this is a dupe of a Avr specific question I answered too