Came close to blacking out at work

Am

This is by far the scariest thing that has happened to me. At first I started to feel a little dizzy then really hot I started sweating and tried to sit down in a chair. I kept feeling like I was going to black out my vision significantly decreased and I ran to the corner to sit on the floor because I was sure I was going to faint and didn't want to hit my head. I sat down and it had to have lasted a good 45 seconds. It finally went away but I was unable to stay at work because the feeling kept coming back. Not sure what's going on. I ate breakfast, and it wasn't that long after I ate, maybe an hour or two. That was at 8 am. Now is is 4pm and I'm still feeling off. Any suggestions