On May 3, 2017 USCIS announced that data entry has been completed and petitions not selected are being returned to the Employer. You may continue to benefit from cap gap until you receive a rejection notice. Once the notice is received you have 60 days to leave the US starting from the later of the receipt of the rejection notice or the program end date. Aside from departing the U.S., you may have other options during this 60 day period.
If you have not taken advantage of the STEM extension and you are eligible to do so this is the best option as you will have at least one more opportunity to apply for the H-1B lottery. If you do not fall under the STEM category you have limited options. You can enroll in an MS or MBA but you will not get a second OPT period if you already have a Master’s degree. You can also apply for a PhD program.
You can also look for a cap exempt employer. This would allow you to immediately file an H-1B.
If those options are not available and your spouse holds an H-1 or an F-1, you can change your status to H-4 or F-2. Although you would not be employment authorized (unless your H-1 spouse has an approved 140) you can remain in the United States and potentially file again for the cap in April of next year.
Finally, if your employer has an office in another country you can see if there are opportunities for you to work abroad. After one year you could potentially return as an L or have another cap filing opportunity.
If you are out of options and you leave the US, an employer may still sponsor you for an H-1B from abroad. It goes without saying that it will be harder but not impossible to find a job in the States while abroad. Stay focused, lock in on your goals and good luck.