Smart healthcare systems are novel innovations that can improve healthcare services by giving individuals details about their medical conditions in real time. However, processing and analyzing huge amounts of information stored in these systems can frequently result in latency and interruptions, negatively impacting the system's efficiency. To solve this issue, this research presents an innovative healthcare framework incorporating cloud and fog computing techniques to reduce latency and enhance whole system performance. The framework has three different tiers: the user tier, the fog tier, and the cloud tier. Health-related information is gathered from users in the user tier using cloud pulses. An optimized Ant Colony Optimization load balancing algorithm subsequently monitors this data. The load balancer allocates user requests to fog servers in the fog tier, considering factors including response time and cost. The fog tier is comprised of fog servers that are located in closer proximity to end-users and are tasked with the real-time processing and analysis of data. The cloud tier accommodates vast quantities of healthcare data and facilitates sophisticated analytics and processing functionalities. The performance of the proposed framework was assessed by implementing it on the Cloud Analyst tool and utilizing metrics such as response time, cost, and system throughput. The experiment findings indicate that the proposed framework performs better in mitigating delay in healthcare compared to conventional healthcare systems. The load balancer that was optimized using Ant Colony Optimization algorithm efficiently allocated the workload among the fog servers, resulting in enhanced system response time and decreased latency. The concept of fog computing proved to be highly productive in mitigating latency by enabling local data processing and analysis near the end-user, thereby reducing reliance on the cloud tier. The empirical findings indicate that the framework put forward can transform the provision of healthcare services, rendering them more streamlined, economical, and focused on the needs of patients.