Symmetry-breaking effects and spontaneous generation of vortices in hybrid superconductor-ferromagnet nanostructures