Layoffs are part and parcel of employment. It hurts and self-questions your capabilities, but in reality, it is more about organizational restructuring. In short, the organization mismanaged, and you had to pay the price of losing your job. You are still the same person working and earning for living. Don’t self-doubt your capabilities.