I have definitely written a happy song about someone and then we ended up splitting up, but you have to put those kind of things to the back of your mind and tell yourself that it's a good song and it works on the album.
If you have some magical chemistry that actually find the music you make compelling, that is a big bonus.

